Changeset afa6e74 in mainline for libc/generic/as.c


Ignore:
Timestamp:
2006-05-16T23:37:58Z (19 years ago)
Author:
Jakub Vana <jakub.vana@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
04a73cdf
Parents:
6efe0ddf
Message:

Earliest version of Userspace Framebuffer driver, with stream support in libc.
Also Virtual framebuffers made as split on main fb and its usage by streams

(please test it and report)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • libc/generic/as.c

    r6efe0ddf rafa6e74  
    7070
    7171static size_t heapsize = 0;
     72static size_t maxheapsize = (size_t)(-1);
    7273/* Start of heap linker symbol */
    7374extern char _heap;
     
    9293        if (incr < 0 && incr+heapsize > heapsize)
    9394                return NULL;
     95        /* Check for user limit */
     96        if ((maxheapsize!=(size_t)(-1)) && (heapsize + incr)>maxheapsize) return NULL;
    9497
    9598        rc = as_area_resize(&_heap, heapsize + incr,0);
     
    104107        return res;
    105108}
     109
     110void *set_maxheapsize(size_t mhs)
     111{
     112        maxheapsize=mhs;
     113        /* Return pointer to area not managed by sbrk */
     114        return (void *)&_heap + maxheapsize;
     115
     116}
Note: See TracChangeset for help on using the changeset viewer.