Changeset afa6e74 in mainline for libc/generic/as.c
- Timestamp:
- 2006-05-16T23:37:58Z (19 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 04a73cdf
- Parents:
- 6efe0ddf
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
libc/generic/as.c
r6efe0ddf rafa6e74 70 70 71 71 static size_t heapsize = 0; 72 static size_t maxheapsize = (size_t)(-1); 72 73 /* Start of heap linker symbol */ 73 74 extern char _heap; … … 92 93 if (incr < 0 && incr+heapsize > heapsize) 93 94 return NULL; 95 /* Check for user limit */ 96 if ((maxheapsize!=(size_t)(-1)) && (heapsize + incr)>maxheapsize) return NULL; 94 97 95 98 rc = as_area_resize(&_heap, heapsize + incr,0); … … 104 107 return res; 105 108 } 109 110 void *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.