Lines Matching refs:gMemory
42 static nsIMemory* gMemory = nsnull;
46 NS_ASSERTION(gMemory, "must be not null after SetupGlobalMemory");
47 NS_IF_RELEASE(gMemory);
52 (gMemory ? PR_TRUE : (PRBool)(SetupGlobalMemory() != nsnull))
57 NS_ASSERTION(!gMemory, "must be called once");
58 if (!gMemory)
60 NS_GetMemoryManager(&gMemory);
61 NS_ASSERTION(gMemory, "can't get memory manager!");
62 if (gMemory)
65 return gMemory;
71 NS_ASSERTION(!gMemory, "must be called once");
72 if (!gMemory)
74 NS_GetMemoryManager(&gMemory);
75 NS_ASSERTION(gMemory, "can't get memory manager!");
76 if (!gMemory)
84 NS_IF_RELEASE(gMemory);
97 return gMemory->Alloc(size);
106 return gMemory->Realloc(ptr, size);
115 gMemory->Free(ptr);
124 return gMemory->HeapMinimize(aImmediate);
133 void* newPtr = gMemory->Alloc(size);
145 nsIMemory* result = gMemory;