Lines Matching defs:mem
103 // Returns a pointer to the TempMapping instance that allocated the |mem|
106 static TempMapping* GetMappingFromPtr(void* mem);
170 uint8* mem = reinterpret_cast<uint8*>(ptr);
171 mem -= sizeof(T);
172 if (mem[0] == HEAP_ALLOCATION) {
173 delete [] mem;
175 DCHECK_EQ(static_cast<uint8>(FILE_ALLOCATION), mem[0]);
176 TempMapping* mapping = TempMapping::GetMappingFromPtr(mem);
192 uint8* mem = NULL;
196 mem = new(std::nothrow) uint8[bytes];
197 if (mem != NULL) {
198 mem[0] = static_cast<uint8>(HEAP_ALLOCATION);
204 mem = reinterpret_cast<uint8*>(mapping->memory());
205 mem[0] = static_cast<uint8>(FILE_ALLOCATION);
208 return mem ? reinterpret_cast<pointer>(mem + sizeof(T)) : NULL;