HP85 GPIB Disk Emulator  1.0
HP85GPIBDiskEmulator
All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
ram.h
Go to the documentation of this file.
1 
13 #ifndef _RAM_H_
14 #define _RAM_H_
15 #undef malloc
16 #undef calloc
17 #undef free
18 
19 
20 extern char * __brkval;
21 extern char * __malloc_heap_start;
22 extern char * __malloc_heap_end;
23 extern size_t __malloc_margin;
24 extern void *__stack;
25 
26 #ifdef AVR
27  extern unsigned int __heap_start;
28  extern unsigned int __heap_end;
29  extern unsigned int __bss_start;
30  extern unsigned int __bss_end;
31  extern unsigned int __data_start;
32  extern unsigned int __data_end;
33 #endif
34 #ifdef ESP8266
35  extern unsigned long int __heap_start;
36  extern unsigned long int __heap_end;
37  extern unsigned long int __bss_start;
38  extern unsigned long int __bss_end;
39  extern unsigned long int __data_start;
40  extern unsigned long int __data_end;
41 #endif
42 
43 
44 /* ram.c */
45 size_t heaptop ( void );
46 size_t freeRam ( void );
47 void PrintFree ( void );
48 void *safecalloc ( int size , int elements );
49 void *safemalloc ( size_t size );
50 void safefree ( void *p );
51 
52 #endif //_RAM_H_
safefree
void safefree(void *p)
Safe free - Only free a pointer if it is in malloc memory range.
Definition: ram.c:158
__stack
void * __stack
__malloc_heap_start
char * __malloc_heap_start
PrintFree
void PrintFree(void)
Display AVR free memory of each type>
Definition: ram.c:69
freeRam
size_t freeRam(void)
Return AVR Free memory for Malloc.
Definition: ram.c:50
safemalloc
void * safemalloc(size_t size)
Safe Malloc - Display Error message if Malloc fails.
Definition: ram.c:139
heaptop
size_t heaptop(void)
calloc may be aliased to safecalloc
Definition: ram.c:27
__malloc_heap_end
char * __malloc_heap_end
__malloc_margin
size_t __malloc_margin
safecalloc
void * safecalloc(int size, int elements)
Safe Alloc - Display Error message if Calloc fails.
Definition: ram.c:122
__brkval
char * __brkval