X-Git-Url: https://scm.lunaixsky.com/lunaix-os.git/blobdiff_plain/bffa3430fbbaaad29bec0b5bee9c1f0bfc7fd068..34f6af4f61e0eec9c96113e07f140b609b4113c8:/lunaix-os/arch/generic/includes/sys-generic/bootmem.h diff --git a/lunaix-os/arch/generic/includes/sys-generic/bootmem.h b/lunaix-os/arch/generic/includes/sys-generic/bootmem.h new file mode 100644 index 0000000..1dfa9ea --- /dev/null +++ b/lunaix-os/arch/generic/includes/sys-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 */