Download
Docs

Contact
About
Docs
CVS

Reference: BMEM (block memory)

General

BMEM provides block memory functionality for those situations where it's necessary to allocate many homogenous structures. It provides significantly higher performance than alternative methods, see the benchmarks for more information.
  • BMEM *bmem_new(size_t block_size);
    Creates a new memory area that will return blocks of size block_size.
     
  • void bmem_del(BMEM *mem);
    Destroys memory area specified by mem and frees all blocks associated with it.
     
  • void *bmem_block_new(BMEM *mem);
    Returns an available block from memory area specified by mem.
     
  • void bmem_block_del(BMEM *mem, void *block);
    Puts the given block back into the memory area.

 

 

Flux, these web pages, and all related material are Copyright©1999-2000 Simplemente and the respective authors, and are licensed under the GNU GPL. Please see the About page for more details. Web design by Joakim Ziegler <joakim@simplemente.net>, illustrations by Belinda Laws, <boysdontcry@zombieworld.com>.