MCPcopy Create free account
hub / github.com/Singular/Singular / TestAddrContent

Function TestAddrContent

omalloc/omtTest.c:106–127  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

104}
105
106void TestAddrContent(void* addr, unsigned long value, size_t size)
107{
108 size_t sizeW = OM_ALIGN_SIZE(size) >> LOG_SIZEOF_LONG;
109 int i;
110
111 if (!OM_IS_ALIGNED(addr))
112 {
113 omReportError(omError_Unknown, omError_NoError, OM_FLR,
114 "addr %p unaligned", addr);
115 return;
116 }
117
118 for (i=0; i<sizeW; i++)
119 {
120 if (((unsigned long*)addr)[i] != value)
121 {
122 omReportError(omError_Unknown, omError_NoError, OM_FLR,
123 "word %d modified: is %u should be %u", i, ((unsigned long*)addr)[i], value);
124 return;
125 }
126 }
127}
128#endif
129
130void InitCellAddrContent(omMemCell cell)

Callers 2

omtTestReallocFunction · 0.85
omtTestDebugFunction · 0.85

Calls 1

omReportErrorFunction · 0.85

Tested by

no test coverage detected