X-Git-Url: https://scm.lunaixsky.com/lunaix-os.git/blobdiff_plain/47c4e0c19ae8526b14ce4e0d7b243f7a4dc6fafd..bffa3430fbbaaad29bec0b5bee9c1f0bfc7fd068:/lunaix-os/includes/lunaix/generic/bootmem.h diff --git a/lunaix-os/includes/lunaix/generic/bootmem.h b/lunaix-os/includes/lunaix/generic/bootmem.h new file mode 100644 index 0000000..1dfa9ea --- /dev/null +++ b/lunaix-os/includes/lunaix/generic/bootmem.h @@ -0,0 +1,29 @@ +#ifndef __LUNAIX_BOOTMEM_H +#define __LUNAIX_BOOTMEM_H + +#include + +/* + * bootmem: + * + * Architecture-defined memory manager during boot stage. + * + * It provide basic memory service before kernel's mm + * context is avaliable. As it's name stated, this is + * particularly useful for allocating temporary memory + * to get essential things done in the boot stage. + * + * Implementation detail is not enforced by Lunaix, but it + * is recommend that such memory pool should be reclaimed + * after somewhere as earlier as possible (should not later + * than the first process spawning) + * + */ + +void* +bootmem_alloc(unsigned int size); + +void +bootmem_free(void* ptr); + +#endif /* __LUNAIX_BOOTMEM_H */