XINU
|
メモリマネージャが使用する定数と構造体の宣言 More...
Go to the source code of this file.
Data Structures | |
struct | memblk |
メモリブロックを管理するための構造体。 More... | |
Macros | |
#define | freestk(p, len) |
getstk()で割り当てたスタックメモリを解放する。 More... | |
#define | PAGE_SIZE 4096 |
ページサイズ(メモリ領域を管理する一定のサイズ。Byte単位) More... | |
#define | roundmb(x) (char *)((7 + (uint32)(x)) & (~7)) |
メモリブロックサイズ(8の倍数)にアドレスを変換するために、8の倍数で丸める。 More... | |
#define | truncmb(x) (char *)(((uint32)(x)) & (~7)) |
メモリブロックサイズ(8の倍数)にアドレスを変換するために、下位3bitを切り捨てる。 More... | |
Variables | |
int | bss |
BSSセグメントの開始アドレス(リンカが追加する) More... | |
int | data |
データセグメントの開始アドレス(リンカが追加する) More... | |
int | ebss |
BSSセグメントの終了アドレス(リンカが追加する) More... | |
int | edata |
データセグメントの終了アドレス(リンカが追加する) More... | |
int | end |
プログラムの終了アドレス(リンカが追加する) More... | |
int | etext |
テキストセグメントの終了アドレス(リンカが追加する) More... | |
void * | maxheap |
最上位かつ正常なヒープアドレス More... | |
struct memblk | memlist |
フリーメモリリストの先頭 More... | |
void * | minheap |
ヒープの開始地点 More... | |
int | text |
テキストセグメントの開始アドレス(リンカが追加する) More... | |
メモリマネージャが使用する定数と構造体の宣言
Definition in file memory.h.
#define freestk | ( | p, | |
len | |||
) |
#define roundmb | ( | x | ) | (char *)((7 + (uint32)(x)) & (~7)) |
メモリブロックサイズ(8の倍数)にアドレスを変換するために、8の倍数で丸める。
~7 = 0xF8 = 0b11111000である。
0 -> 7 -> 0 1 -> 8 -> 8 2 -> 9 -> 8 : (省略) 7 -> 14 -> 8 8 -> 15 -> 8 9 -> 16 -> 16
[in] | x | アドレス |
#define truncmb | ( | x | ) | (char *)(((uint32)(x)) & (~7)) |
int bss |
BSSセグメントの開始アドレス(リンカが追加する)
int data |
データセグメントの開始アドレス(リンカが追加する)
Referenced by nulluser().
int ebss |
BSSセグメントの終了アドレス(リンカが追加する)
Referenced by nulluser().
int edata |
データセグメントの終了アドレス(リンカが追加する)
int end |
プログラムの終了アドレス(リンカが追加する)
Referenced by meminit().
int etext |
テキストセグメントの終了アドレス(リンカが追加する)
Referenced by nulluser().
void* maxheap |
最上位かつ正常なヒープアドレス
最上位かつ正常なヒープアドレス
Definition at line 10 of file meminit.c.
Referenced by freemem(), meminit(), and xsh_memdump().
struct memblk memlist |
フリーメモリリストの先頭
フリーメモリリストの先頭
Definition at line 27 of file initialize.c.
Referenced by freemem(), getmem(), getstk(), meminit(), nulluser(), printFreeList(), and printMemUse().
void* minheap |
int text |
テキストセグメントの開始アドレス(リンカが追加する)
Referenced by nulluser().