1.0.4 • Published 6 years ago

wlib-malloc v1.0.4

Weekly downloads
14
License
-
Repository
-
Last release
6 years ago

wlib-malloc

malloc and free replacements for WLib using wlib-tlsf.

Install

wio pac add wlib-malloc

Usage

mem::meminit must be called at program start with a user-provided memory pool for the global allocator instance to manage.

static byte s_pool[POOL_SIZE];

using namespace wlp;

int main(int argc, char *argv[]) {
    mem::init(s_pool, POOL_SIZE);
    
    char *ptr = static_cast<char *>(mem::alloc(128));
    // ...
    mem::free(ptr);
}
1.0.4

6 years ago

1.0.3

6 years ago

1.0.2

6 years ago

1.0.1

6 years ago

1.0.0

6 years ago