memsizes.h File Reference
#include <basemem.h>

Go to the source code of this file.


static unsigned int basememsize (void)
 Get size of base memory from BIOS free base memory counter. More...
unsigned int extmemsize (void)
 Get size of extended memory. More...

Function Documentation



◆ basememsize()

static unsigned int basememsize ( void  )

Get size of base memory from BIOS free base memory counter.

Return values
basememBase memory size, in kB

Definition at line 13 of file memsizes.h.

13  {
14  return get_fbms();
15 }
static unsigned int get_fbms(void)
Read the BIOS free base memory counter.
Definition: basemem.h:21

References get_fbms().

Referenced by x86_get_memmap().

◆ extmemsize()

unsigned int extmemsize ( void  )

Get size of extended memory.

Return values
extmemExtended memory size, in kB

Note that this is only an approximation; for an accurate picture, use the E820 memory map obtained via get_memmap();

Definition at line 156 of file memmap.c.

156  {
157  unsigned int extmem_e801;
158  unsigned int extmem_88;
160  /* Try INT 15,e801 first, then fall back to INT 15,88 */
161  extmem_88 = extmemsize_88();
162  extmem_e801 = extmemsize_e801();
163  return ( extmem_e801 ? extmem_e801 : extmem_88 );
164 }
static unsigned int extmemsize_88(void)
Get size of extended memory via INT 15,88.
Definition: memmap.c:136
static unsigned int extmemsize_e801(void)
Get size of extended memory via INT 15,e801.
Definition: memmap.c:79

References extmemsize_88(), and extmemsize_e801().

Referenced by nbi_process_segments(), and x86_get_memmap().