mirror of
https://github.com/drasko/codezero.git
synced 2026-01-24 08:43:15 +01:00
Initial commit
This commit is contained in:
20
libs/c/src/k_r_malloc.h
Normal file
20
libs/c/src/k_r_malloc.h
Normal file
@@ -0,0 +1,20 @@
|
||||
#ifndef _LIBC_K_R_MALLOC_H_
|
||||
#define _LIBC_K_R_MALLOC_H_
|
||||
|
||||
#define NALLOC 0x10000 /* minimum #units to request */
|
||||
|
||||
typedef long long Align; /* for alignment to long long boundary */
|
||||
|
||||
union header { /* block header */
|
||||
struct {
|
||||
union header *ptr; /* next block if on free list */
|
||||
unsigned size; /* size of this block */
|
||||
} s;
|
||||
Align x; /* force alignment of blocks */
|
||||
};
|
||||
|
||||
typedef union header Header;
|
||||
|
||||
Header *morecore(unsigned nu);
|
||||
void __malloc_init(void*, void*);
|
||||
#endif /* _LIBC_K_R_MALLOC_H_ */
|
||||
Reference in New Issue
Block a user