Added GetGlobalAllocator.

git-svn-id: svn://10.0.0.236/trunk@43009 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
warren%netscape.com
1999-08-10 19:54:17 +00:00
parent cfc2d035f8
commit 13be55fe4c
2 changed files with 10 additions and 1 deletions

View File

@@ -165,7 +165,15 @@ void* nsAllocator::Clone(const void* ptr, PRUint32 size)
void* p = mAllocator->Alloc(size);
if(p) memcpy(p, ptr, size);
return p;
}
}
NS_EXPORT nsIAllocator*
nsAllocator::GetGlobalAllocator()
{
if(!EnsureAllocator()) return nsnull;
NS_ADDREF(mAllocator);
return mAllocator;
}
// private: