Skip to content

Commit

Permalink
added new memory allocator
Browse files Browse the repository at this point in the history
  • Loading branch information
davewx7 committed Dec 2, 2008
1 parent 58e9c5f commit 3764112
Show file tree
Hide file tree
Showing 4 changed files with 5,445 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/SConscript
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,8 @@ libwesnoth_core_sources = Split("""
config.cpp
gettext.cpp
log.cpp
malloc.c
poolalloc.c
map.cpp
map_location.cpp
md5.cpp
Expand Down
5 changes: 5 additions & 0 deletions src/game.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2142,8 +2142,13 @@ static int do_gameloop(int argc, char** argv)
return 0;
}

extern "C" {
void init_custom_malloc();
}

int main(int argc, char** argv)
{
init_custom_malloc();
if(SDL_Init(SDL_INIT_TIMER) < 0) {
fprintf(stderr, "Couldn't initialize SDL: %s\n", SDL_GetError());
return(1);
Expand Down
Loading

0 comments on commit 3764112

Please sign in to comment.