UbixOS V2 2.0

Data Structures | Macros | Functions
kmalloc.h File Reference
`#include <sys/types.h>`
Include dependency graph for kmalloc.h:

Go to the source code of this file.

## Data Structures
struct | memDescriptor

## Macros
#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)

## Macro Definition Documentation

## ◆ MALLOC_ALIGN

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

Definition at line 40 of file kmalloc.h.

## ◆ MALLOC_ALIGN_SIZE

#define MALLOC_ALIGN_SIZE 32

Definition at line 39 of file kmalloc.h.

## ◆ sysID

#define sysID -2

Definition at line 38 of file kmalloc.h.

## Function Documentation

## ◆ kfree()

void kfree | ( | void * | baseAddr | ) |

Definition at line 342 of file kmalloc.c.

References assert, and memDescriptor::baseAddr.

Referenced by close(), elf_load_file(), execFile(), falloc(), fdestroy(), fopen(), kmod_load(), ldEnable(), ne2kFreeBuffer(), operator delete(), operator delete[](), pciProbe(), sdeThread(), sem_destroy(), sys_read(), sys_write(), sysExec(), systemTask(), ubixfs_cacheDelete(), ubixFSmkDir(), ubthread_cond_destroy(), ubthread_mutex_destroy(), vfs_mount(), writeFileByte(), and writeUbixFS().

## ◆ kmalloc()

void* kmalloc | ( | uInt32 | len | ) |

Definition at line 241 of file kmalloc.c.

References spinLock().

Referenced by addDirEntry(), biosCall(), device_add(), dup2(), elf_load_file(), execFile(), falloc(), fcntl(), fdc_init(), fopen(), initLNC(), kmod_add(), kmod_load(), ldEnable(), lnc_rxINT(), lnc_thread(), lncAttach(), new_trieNode(), operator new(), operator new[](), pciProbe(), schedNewTask(), sem_init(), shell_thread(), sys_fork(), sys_pipe2(), sys_sem_new(), sys_thread_new(), sys_write(), sysExec(), sysSDE(), ubixfs_cacheNew(), ubixfs_initialize(), ubixFSLoadDir(), ubixFSmkDir(), ubthread_cond_init(), ubthread_mutex_init(), vfs_mount(), vitals_init(), writeFileByte(), and writeUbixFS().

Here is the call graph for this function: