mirror of
https://github.com/fergalmoran/ladybird.git
synced 2025-12-22 09:19:03 +00:00
Run without SimpleMalloc locally for now.
This commit is contained in:
@@ -1,6 +1,37 @@
|
||||
#include <cstdio>
|
||||
#include "SimpleMalloc.h"
|
||||
#include <new>
|
||||
#include <cstdlib>
|
||||
|
||||
#define USE_SYSTEM_MALLOC
|
||||
|
||||
#ifdef USE_SYSTEM_MALLOC
|
||||
|
||||
extern "C" {
|
||||
|
||||
void* kcalloc(dword nmemb, dword size)
|
||||
{
|
||||
return calloc(nmemb, size);
|
||||
}
|
||||
|
||||
void* kmalloc(dword size)
|
||||
{
|
||||
return malloc(size);
|
||||
}
|
||||
|
||||
void kfree(void* ptr)
|
||||
{
|
||||
free(ptr);
|
||||
}
|
||||
|
||||
void* krealloc(void* ptr, dword size)
|
||||
{
|
||||
return realloc(ptr, size);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
#else
|
||||
|
||||
extern "C" {
|
||||
|
||||
@@ -64,3 +95,5 @@ void operator delete[](void* ptr, size_t)
|
||||
return kfree(ptr);
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
Reference in New Issue
Block a user