MCPcopy Create free account
hub / github.com/BlitterStudio/amiberry / getallocblock

Function getallocblock

src/debugmem.cpp:891–912  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

889}
890
891static struct debugmemallocs *getallocblock(void)
892{
893 int round = 0;
894 alloccnt++;
895 if (alloccnt >= MAX_DEBUGMEMALLOCS) {
896 alloccnt = 1;
897 }
898 while (allocs[alloccnt]->id != 0) {
899 alloccnt++;
900 if (alloccnt >= MAX_DEBUGMEMALLOCS) {
901 alloccnt = 1;
902 if (round) {
903 console_out_f(_T("debugmem out of alloc blocks!\n"));
904 return NULL;
905 }
906 round++;
907 }
908 }
909 struct debugmemallocs *dm = allocs[alloccnt];
910 dm->id = alloccnt;
911 return dm;
912}
913
914static struct debugmemallocs *debugmem_allocate(uae_u32 size, uae_u32 flags, uae_u32 parentid)
915{

Callers 3

debugmem_allocateFunction · 0.85
debugmem_reserveFunction · 0.85
debugmem_add_segmentFunction · 0.85

Calls 1

console_out_fFunction · 0.50

Tested by

no test coverage detected