comparison nuc-fw/nucleus/er_defs.h @ 79:947b1f473960

beginning of nuc-fw
author Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
date Sun, 11 Aug 2013 07:17:25 +0000
parents
children
comparison
equal deleted inserted replaced
78:2c266d4339ff 79:947b1f473960
1
2 #ifndef ER_DEFS_H
3 #define ER_DEFS_H
4
5 #ifdef NU_DEBUG_MEMORY
6
7 /* NU_DEBUG_MEMORY can only service one memory pool each time it is
8 compiled. It will examine the memory pool NU_DEBUG_POOL points to.*/
9 #define NU_DEBUG_POOL System_Memory
10
11 typedef struct ER_DEBUG_ALLOCATION_STRUCT
12 {
13
14 /* prev is the link needed to maintain a linked list of all the
15 ER_DEBUG_ALLOCATION structures. The head of the list is the global
16 variable ERD_RecentAllocation. */
17 struct ER_DEBUG_ALLOCATION_STRUCT *prev;
18 /* size is the number of bytes used for the users memory allocation */
19 unsigned int size;
20 /* Assignes each allocation an unique ID */
21 unsigned long AllocSequenceCounter;
22 /* line and file refer to the place in the code where the call to the
23 allocation is made in the application. These variables are filled
24 in with compiler specific macros. */
25 unsigned long line;
26 const char * file;
27 /* head and foot contain the non-null terminated strings "HEAD" and
28 "FOOT" so this module can spot some instances where pointers write
29 to memory locations beyond thier bounds. data is the user's data
30 which the allocation call is intended. */
31 unsigned char head[4];
32 unsigned char data[1];
33
34 } ER_DEBUG_ALLOCATION;
35
36 #endif /* NU_DEBUG_MEMORY */
37
38 #endif /* ER_DEFS_H */
39