Lab 5
lmlib.h
1 #ifndef __LMLIB_H
2 #define __LMLIB_H
3 
16 typedef struct {
17  phys_bytes phys;
18  void *virtual;
19  unsigned long size;
20 } mmap_t;
21 
29 void *lm_init(void);
30 
42 void *lm_alloc(unsigned long size, mmap_t *map);
43 
53 void lm_free(mmap_t *map);
54 
55 #endif /*__LMLIB_H */
void * lm_alloc(unsigned long size, mmap_t *map)
Allocates a memory block in low memory area with the specified size.
void lm_free(mmap_t *map)
Frees a memory block in the low memory area, previously allocated using lm_alloc() ...
Definition: lmlib.h:16
phys_bytes phys
physical address
Definition: lmlib.h:17
void * lm_init(void)
Initializes the low memory area, the region up to the 1 MByte physical address, by mapping it on the ...
unsigned long size
size of memory region
Definition: lmlib.h:19