kmalloc.h File Reference

#include <ubixos/types.h>

Go to the source code of this file.

Data Structures

struct  memDescriptor

Defines

#define MALLOC_ALIGN(size)   (size + ((((size) % (MALLOC_ALIGN_SIZE)) == 0)? 0 : ((MALLOC_ALIGN_SIZE) - ((size) % (MALLOC_ALIGN_SIZE)))))
#define MALLOC_ALIGN_SIZE   32
#define sysID   -2

Functions

void kfree (void *baseAddr)
void * kmalloc (uInt32 len)


Define Documentation

#define MALLOC_ALIGN ( size   )     (size + ((((size) % (MALLOC_ALIGN_SIZE)) == 0)? 0 : ((MALLOC_ALIGN_SIZE) - ((size) % (MALLOC_ALIGN_SIZE)))))

Definition at line 41 of file kmalloc.h.

Referenced by kmalloc().

#define MALLOC_ALIGN_SIZE   32

Definition at line 40 of file kmalloc.h.

#define sysID   -2

Definition at line 39 of file kmalloc.h.

Referenced by vmm_getFreeMallocPage(), vmm_pagingInit(), and vmmFindFreePage().


Function Documentation

void kfree ( void *  baseAddr  ) 

Definition at line 351 of file kmalloc.c.

References assert, memDescriptor::baseAddr, insertFreeDesc(), kprintf(), memDescriptor::limit, mallocSpinLock, memset(), memDescriptor::next, memDescriptor::prev, spinLock(), spinUnlock(), and usedKernDesc.

Referenced by close(), device_remove(), execFile(), fclose(), fopen(), kmod_load(), ldEnable(), mpi_destroyMbox(), mpi_fetchMessage(), ne2kFreeBuffer(), operator delete(), operator delete[](), sys_mbox_free(), sys_sem_free_(), sys_write(), sysExec(), systemTask(), ubixfs_cacheDelete(), ubixFSmkDir(), ubthread_cond_destroy(), ubthread_mutex_destroy(), vfs_mount(), and writeUbixFS().

void* kmalloc ( uInt32  len  ) 

Definition at line 247 of file kmalloc.c.

References assert, memDescriptor::baseAddr, freeKernDesc, getEmptyDesc(), insertFreeDesc(), kprintf(), memDescriptor::limit, MALLOC_ALIGN, mallocSpinLock, memDescriptor::next, memDescriptor::prev, spinLock(), spinUnlock(), and usedKernDesc.

Referenced by addDirEntry(), biosCall(), devfs_initialize(), devfs_makeNode(), device_add(), execFile(), falloc(), fdc_init(), fopen(), initHardDisk(), initLNC(), kmain(), kmod_add(), kmod_load(), ldEnable(), lncAttach(), low_level_init(), mpi_createMbox(), mpi_postMessage(), mpi_spam(), ne2k_init(), ne2kAllocBuffer(), openFileUbixFS(), operator new(), operator new[](), sched_init(), schedNewTask(), shell_thread(), sys_mbox_new(), sys_sem_new_(), sys_thread_new(), sys_write(), sysctl_add(), sysctl_init(), sysExec(), tty_init(), ubixfs_cacheNew(), ubixfs_initialize(), ubixFSLoadDir(), ubixFSmkDir(), ubixFSUnlink(), ubthread_cond_init(), ubthread_create(), ubthread_mutex_init(), ufs_openFile(), vfs_mount(), vfsRegisterFS(), vitals_init(), and writeUbixFS().


Generated on Tue Dec 5 23:34:59 2006 for UbixOS V2 by  doxygen 1.4.7