Your Browser is not longer supported
Please use Google Chrome, Mozilla Firefox or Microsoft Edge to view the page correctly
Loading...
{{viewport.spaceProperty.prod}}
memalloc - Reserve memory space
&pagelevel(4)&pagelevel
Definition | #include <stdlib.h> void *memalloc(size_t n); memalloc allocates contiguous memory space of n bytes at execution time. memalloc passes the request for memory space directly to the appropriate operating system call. This function is particularly suitable for memory areas with a size of more than 2 Kbytes (also see memfree ). |
Return val. | Pointer to the new memory area |
| provided memalloc was able to allocate new memory space. This pointer may be used for any data type. |
NULL pointer | if memalloc was not able to provide the memory space, e.g. because the memory space still available does not suffice for the request. |
Notes | The new data area begins on a doubleword boundary. The requested length n is rounded up to the next multiple of 2 Kbytes. A serious disruption in working memory may be expected if the length of the memory area provided is exceeded when writing. The memory area requested with memalloc can be released again by using memfree . |
See also | memfree |