Skip to content

bigorenski/libmalloc

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

18 Commits
 
 
 
 
 
 
 
 

Repository files navigation

libmalloc

Simple library providing dynamic memory allocation (similar to malloc) for hobby OSes and embedded systems

This library dependes on:
void* mmGetPages(MWORD n) - Returns a pointer to n contiguous pages (4kb each) - This should implement some kind of lock/unlock
void mmReleasePages(MWORD* address, MWORD n) - returns nothing. Release pages to the system - This should implement some kind of lock/unlock

<stdint.h> - Definitions for uint32_t and uint64_t(for x86_64 only)
<stdbool.h> - Definition for bool type
<string.h> - memcpy and memset

---------------------------------------------------------------------------------------------

This library provides:
MWORD - Macro. Extends to uint32_t or uint64_t depending on target
MWORD lmInit() - Initialize the library. Returns 0 on success
void* lmMalloc(MWORD size) - Similar to malloc. Returns pointer to allocated space
MWORD lmFree(void *ptr) - Returns how much data was freed

About

Simple library providing dynamic memory allocation for hobby OSes and embedded systems

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy