zalloc_mem.h (55b1c6e7e4a6909004e13c6d2f328f911a8e7b83) | zalloc_mem.h (e57c0c2afbaef051b01022588ed54a6c4ace79da) |
---|---|
1/* | 1/* |
2 * This module derived from code donated to the FreeBSD Project by | 2 * This module derived from code donated to the FreeBSD Project by |
3 * Matthew Dillon <dillon@backplane.com> 4 * 5 * Copyright (c) 1998 The FreeBSD Project 6 * All rights reserved. 7 * 8 * Redistribution and use in source and binary forms, with or without 9 * modification, are permitted provided that the following conditions 10 * are met: --- 18 unchanged lines hidden (view full) --- 29 * $FreeBSD$ 30 */ 31 32/* 33 * H/MEM.H 34 * 35 * Basic memory pool / memory node structures. 36 */ | 3 * Matthew Dillon <dillon@backplane.com> 4 * 5 * Copyright (c) 1998 The FreeBSD Project 6 * All rights reserved. 7 * 8 * Redistribution and use in source and binary forms, with or without 9 * modification, are permitted provided that the following conditions 10 * are met: --- 18 unchanged lines hidden (view full) --- 29 * $FreeBSD$ 30 */ 31 32/* 33 * H/MEM.H 34 * 35 * Basic memory pool / memory node structures. 36 */ |
37#ifndef _ZALLOC_MEM_H 38#define _ZALLOC_MEM_H |
|
37 38typedef struct MemNode { | 39 40typedef struct MemNode { |
39 struct MemNode *mr_Next; 40 uintptr_t mr_Bytes; | 41 struct MemNode *mr_Next; 42 uintptr_t mr_Bytes; |
41} MemNode; 42 43typedef struct MemPool { | 43} MemNode; 44 45typedef struct MemPool { |
44 void *mp_Base; 45 void *mp_End; 46 MemNode *mp_First; 47 uintptr_t mp_Size; 48 uintptr_t mp_Used; | 46 void *mp_Base; 47 void *mp_End; 48 MemNode *mp_First; 49 uintptr_t mp_Size; 50 uintptr_t mp_Used; |
49} MemPool; 50 | 51} MemPool; 52 |
51#define ZNOTE_FREE 0 52#define ZNOTE_REUSE 1 | 53#define ZNOTE_FREE 0 54#define ZNOTE_REUSE 1 |
53 | 55 |
56#endif /* _ZALLOC_MEM_H */ |
|