Skip to content

Memory allocations and management library written in C to be used without the standard library

License

Notifications You must be signed in to change notification settings

antoninhrlt/memlib

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

15 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

memlib

Memory allocations and management library written in C to be used without the standard library

Get started

The project is using xmake and it requires to have this tool installed on your computer.

  • git clone /~https://github.com/antoninhrlt/memlib
  • cd memlib
  • xmake install (or xmake install -o <target folder>)

The library is now installed on your computer and you can start using it !

Example

int array[] = {1, 2, 3};
int* copy = memlib_alloc(sizeof(int) * 3);

memlib_copy(copy, array, 3);

printf("%p : [%i, %i, %i]\n", copy, copy[0], copy[1], copy[2]);
// Indicate if both arrays are the same
printf("? %s\n", memlib_comp(array, copy, 3) ? "true" : "false");

memlib_free(copy);

About

Memory allocations and management library written in C to be used without the standard library

Topics

Resources

License

Stars

Watchers

Forks