Ignore:
Timestamp:
Mar 22, 2008, 10:39:25 AM (15 years ago)
Author:
Sam Hocevar
Message:
  • Get rid of jmalloc and replace it with standard malloc. Modern operating systems certainly perform a lot better than this custom implementation, and we have superior tools (eg. valgrind) to debug and profile memory usage without interfering with the code itself.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • abuse/trunk/src/console.cpp

    r124 r129  
    1717#include "linked.hpp"
    1818#include "console.hpp"
    19 #include "jmalloc.hpp"
    2019
    2120void console::put_string(char const *st)
     
    7170{
    7271  hide();
    73   jfree(screen);
    74   jfree(name);
     72  free(screen);
     73  free(name);
    7574}
    7675
     
    8079  w=width;
    8180  h=height;
    82   screen=(char *)jmalloc(w*h,"console screen");
     81  screen=(char *)malloc(w*h);
    8382  memset(screen,' ',w*h);
    8483  cx=cy=0;
     
    8685  lastx=xres/2-screen_w()/2;
    8786  lasty=yres/2-screen_h()/2;
    88   name=(char *)strcpy((char *)jmalloc(strlen(Name)+1,"console name"),Name);
     87  name=(char *)strcpy((char *)malloc(strlen(Name)+1),Name);
    8988}
    9089
Note: See TracChangeset for help on using the changeset viewer.