delorie.com/djgpp/doc/libc/libc_74.html   search  
libc.a reference

[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

biosmemory

Syntax

 
#include <bios.h>

unsigned biosmemory(void);

Description

This function returns the amount of system memory in 1k blocks.

Note that this function doesn't know about extended memory above the 640K mark, so it will report 640K at most. This is a limitation of the BIOS.

Return Value

Bytes of memory / 1024.

Portability

ANSI/ISO C No
POSIX No

Example

 
printf("This system has %d bytes of memory\n", biosmemory()*1024);


  webmaster     delorie software   privacy  
  Copyright © 2004     Updated Apr 2004