[BACK]Return to mem.h CVS log [TXT][DIR] Up to [local] / funnyos / sys

File: [local] / funnyos / sys / mem.h (download)

Revision 1.3, Fri Nov 9 15:04:34 2007 UTC (16 years, 4 months ago) by init
Branch: MAIN
CVS Tags: HEAD
Changes since 1.2: +7 -1 lines

ugly hardcode KMEM_HEAPBEGIN ifdef ARCH_SAM7S64

/*
 * $Id: mem.h,v 1.3 2007/11/09 15:04:34 init Exp $
 */
#ifndef _SYS_MEM_H
#define _SYS_MEM_H

#define KMEM_PAGESIZE 	4	/* bytes */

/* XXX replace with dynamic macross */
#define KMEM_DATABEGIN 	0x00100000 /* 1st MB */

#ifdef ARCH_SAM7S64
#define KMEM_HEAPBEGIN 0x00200800
#else
#define KMEM_HEAPBEGIN 	0x00200000 /* 2nd MB */
#endif

#define KMEM_STACKBEGIN (CONFIG_PHYSMEM - 1) /* end of physical memory */

#define KMEM_MINESTSTACKSIZE 1024 /* 1KB, minimum estimated stack size (when brk shifts to the top of stack) */

#define KMEM_FILLBYTE 0x00 /* byte with which free pages will be filled */

void 	kmem_init(void);
void 	*kmalloc(uint32_t nbytes);
void 	kfree(void *p, uint32_t nbytes);

#endif /* not _SYS_MEM_H */