MCPcopy Create free account
hub / github.com/DentonW/DevIL / AddTrack

Function AddTrack

DevIL/src-ILU/src/ilu_alloc.cpp:21–44  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

19
20
21 void AddTrack(unsigned long addr, unsigned long size, const char *file, unsigned long line)
22 {
23 ALLOC_INFO *Temp;
24
25 if (AllocList == NULL) {
26 AllocList = (ALLOC_INFO*)malloc(sizeof(ALLOC_INFO)); // Just assume it succeeds.
27 AllocList->address = addr;
28 AllocList->size = size;
29 AllocList->line = line;
30 strncpy(AllocList->file, file, 63);
31 AllocList->Next = NULL;
32 }
33 else {
34 Temp = AllocList;
35 AllocList = (ALLOC_INFO*)malloc(sizeof(ALLOC_INFO)); // Just assume it succeeds.
36 AllocList->address = addr;
37 AllocList->size = size;
38 AllocList->line = line;
39 strncpy(AllocList->file, file, 63);
40 AllocList->Next = Temp;
41 }
42
43 return;
44 }
45
46
47 void RemoveTrack(unsigned long addr)

Callers 2

c_allocFunction · 0.85
m_allocFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected