Technical Support
On-Line Manuals
RL-ARM User's Guide (MDK v4)
#include <rtl.h> void *_alloc_box ( void* box_mem ); /* Start address of the memory pool */
The _alloc_box function allocates a block of memory from the memory pool that begins at the address box_mem.
The _alloc_box function is in the RL-RTX library. The prototype is defined in rtl.h.
Note
The _alloc_box function returns a pointer to the allocated block if a block was available. If there was no available block, it returns a NULL pointer.
_calloc_box, _free_box, _init_box
#include <rtl.h> /* Reserve a memory for 32 blocks of 20-bytes. */ U32 mpool[32*5 + 3]; void membox_test (void) { U8 *box; U8 *cbox; _init_box (mpool, sizeof (mpool), 20); box = _alloc_box (mpool); /* This block is initialized to 0. */ cbox = _calloc_box (mpool); .. _free_box (mpool, box); _free_box (mpool, cbox); }
Cookie Settings | Terms of Use | Privacy | Accessibility | Trademarks | Contact Us | Feedback
Copyright © 2005-2019 Arm Limited (or its affiliates). All rights reserved.
This site uses cookies to store information on your computer. By continuing to use our site, you consent to our cookies.
Change Settings
Arm’s Privacy Policy has been updated. By continuing to use our site, you consent to Arm’s Privacy Policy. Please review our Privacy Policy to learn more about our collection, use and transfers of your data.