Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C / C++ / MFC
  4. Lea allocator - can somebody please help me ?

Lea allocator - can somebody please help me ?

Scheduled Pinned Locked Moved C / C++ / MFC
helpcsharpquestionhtmlvisual-studio
1 Posts 1 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • M Offline
    M Offline
    Marcello
    wrote on last edited by
    #1

    Hello, sorry for posting this here. The question is: how to replace malloc with the Lea's allocator malloc ? http://gee.cs.oswego.edu/dl/html/malloc.html I tried everything but it doesn't work. I even posted this question to the author of its malloc replacement, Lea Dough. But my question is more windows related so he cannot answer me. At the same time I know that somebody here has been able to do it. Here is the list of what I did and of what some related question. But really what matter is that somebody is telling me how to do it. I am building a program build on top of other dynamic libraries. Everything using STLport. I created another static library, or dynamic I made as very first line of code in the first #if defined(USE_LEA) && defined(_WIN32) #pragma comment(lib, "libLea.lib") #endif If I #include malloc.h then I have compilers problem ( probably because the library is using precompiled headers ) like: c:\Program Files\Microsoft Visual Studio .NET\Vc7\include\stdlib.h(291): error C2375: 'malloc' : redefinition; different linkage If I do not #include malloc.h then it compiles but at the end it is not using the malloc of Lea. I would like not to use detour. I don't think is a good idea to replace malloc.c malloc.h in the Visual Studio .NET\Vc7\include directory Can somebody help me ? Thanks a lot. Cheers, Marcello

    1 Reply Last reply
    0
    Reply
    • Reply as topic
    Log in to reply
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes


    • Login

    • Don't have an account? Register

    • Login or register to search.
    • First post
      Last post
    0
    • Categories
    • Recent
    • Tags
    • Popular
    • World
    • Users
    • Groups