Main Page | Directories | File List | Globals

alloc.c File Reference

#include <agnix/init.h>
#include <asm/types.h>
#include <asm/bitops.h>
#include <asm/memory.h>
#include <asm/paging.h>
#include <agnix/memory.h>
#include <agnix/bugs.h>
#include <agnix/console.h>

Include dependency graph for alloc.c:

Go to the source code of this file.

Defines

#define MOD_NAME   "MEM: "
#define NO_PAGE   0

Functions

void put_free_pages (u32 addr, u8 order)
u32 get_free_pages (u8 order)
void put_free_dma_pages (u32 addr, u8 order)
u32 get_free_dma_pages (u8 order)
int __init memalloc_init (void)

Variables

char _end
main_memory_s main_memory
void(* put_free_pages_fn )(u32 addr, u8 order)
u32(* get_free_pages_fn )(u8 order)
void(* put_free_dma_pages_fn )(u32 addr, u8 order)
u32(* get_free_dma_pages_fn )(u8 order)
allocator_s main_alloc


Define Documentation

#define MOD_NAME   "MEM: "
 

Definition at line 24 of file alloc.c.

#define NO_PAGE   0
 

Definition at line 25 of file alloc.c.

Referenced by _bin_get_free_pages(), and bin_get_free_pages().


Function Documentation

u32 get_free_dma_pages u8  order  ) 
 

Definition at line 52 of file alloc.c.

References get_free_dma_pages_fn.

Referenced by floppy_request_set_data().

00053 {
00054     return (*get_free_dma_pages_fn)(order);
00055 }

u32 get_free_pages u8  order  ) 
 

Definition at line 42 of file alloc.c.

References get_free_pages_fn.

Referenced by adi_netdev_alloc(), arp_neigh_clone(), arp_resolve(), btree_alloc_node(), do_sys_fork(), file_create(), file_table_create(), files_create(), frb_create(), kernel_task_init(), pcibus_allocate_child_bus(), pcibus_allocate_primary_bus(), pcibus_scan_card(), pte_ptr(), register_hash_table(), rtl_8029_receive_frames(), send_signal_to_task(), syscons_write(), and syscons_write_char().

00043 {
00044     return (*get_free_pages_fn)(order);
00045 }

int __init memalloc_init void   ) 
 

Definition at line 57 of file alloc.c.

References _end, bin_alloc_init(), bootmem_init_bh(), bootmem_init_dh(), buddy_alloc_init(), and main_memory.

Referenced by start_kernel().

00058 {
00059     bootmem_init_bh();
00060     bin_alloc_init((u32 *)&_end, 0, main_memory.mem_size);
00061     bootmem_init_dh();
00062     buddy_alloc_init();
00063     
00064     return 0;
00065 }

Here is the call graph for this function:

void put_free_dma_pages u32  addr,
u8  order
 

Definition at line 47 of file alloc.c.

References put_free_dma_pages_fn.

Referenced by bin_put_all_free_pages().

00048 {
00049     return (*put_free_dma_pages_fn)(addr, order);
00050 }

void put_free_pages u32  addr,
u8  order
 

Definition at line 37 of file alloc.c.

References put_free_pages_fn.

Referenced by adi_netdev_free(), arp_del_entry_lock(), arp_resolve(), bin_put_all_free_pages(), btree_alloc_node(), execute_signals(), file_destroy(), frb_destroy(), rtl_8029_receive_frames(), schedule_task(), signal_remove(), and unregister_hash_table().

00038 {
00039     return (*put_free_pages_fn)(addr, order);
00040 }


Variable Documentation

char _end
 

u32(* get_free_dma_pages_fn)(u8 order)
 

Definition at line 33 of file alloc.c.

Referenced by buddy_alloc_fn_init(), and get_free_dma_pages().

u32(* get_free_pages_fn)(u8 order)
 

Definition at line 31 of file alloc.c.

Referenced by bin_alloc_fn_init(), buddy_alloc_fn_init(), and get_free_pages().

struct allocator_s main_alloc
 

Definition at line 35 of file alloc.c.

Referenced by _bin_get_free_pages(), bin_alloc_init(), bin_free_pages(), bin_put_all_free_pages(), bin_reserve_pages(), bin_reserve_system_pages(), and buddy_alloc_init().

struct main_memory_s main_memory
 

Definition at line 23 of file memory.c.

Referenced by bootmem_init_bh(), bootmem_init_dh(), bootmem_print_memory(), do_memtests(), memalloc_init(), remap_kpage_tables(), task_fork(), and task_kernel_create().

void(* put_free_dma_pages_fn)(u32 addr, u8 order)
 

Definition at line 32 of file alloc.c.

Referenced by buddy_alloc_fn_init(), and put_free_dma_pages().

void(* put_free_pages_fn)(u32 addr, u8 order)
 

Definition at line 30 of file alloc.c.

Referenced by bin_alloc_fn_init(), buddy_alloc_fn_init(), and put_free_pages().

Dokumentacje wygenerowano programem Doxygen 1.4.2 dla projektu Agnix