fs: reorginize memory allocations and frees

This commit is contained in:
Michael Shaw 2024-01-30 00:09:56 -05:00
commit 070af3aba0
4 changed files with 65 additions and 29 deletions

View file

@ -12,6 +12,12 @@
#define ALLOC_KERN 0x01
#define ALLOC_DMA 0x02
#define ATTEMPT_FREE(_x) \
if (_x) { \
kfree(_x); \
_x = NULL; \
}
typedef struct _slab {
size_t size; /* size of each object */
size_t tsize; /* total size of this slab */