Re: Does anyone has fixed size memory allocator code?

Discussion in 'C++' started by tom_usenet, Jun 21, 2004.

  1. tom_usenet

    tom_usenet Guest

    On 20 Jun 2004 07:58:25 -0700, (Min-Koo Seo)
    wrote:

    >Hello.
    >
    >I am reading Effective C++ by Scott Myers. In item 10, there is a
    >question for readers: writing generalized fixed size memory allocator.
    >
    >I tried to solve the problem, but I couldn't. To allocate for memory
    >for any objects, I need declare a void *. But, AFAIK, void * does not
    >support + operator, making the solution complicated.
    >
    >If you solved the problem, or know where the answer is, then please
    >let me know.


    Check out Loki's small object allocator:
    http://www.moderncppdesign.com/ (and read the book for the how-to).

    Alternatively, boost's pool library also does this. See www.boost.org

    Tom
    --
    C++ FAQ: http://www.parashift.com/c -faq-lite/
    C FAQ: http://www.eskimo.com/~scs/C-faq/top.html
     
    tom_usenet, Jun 21, 2004
    #1
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. =?Utf-8?B?QmlkYXJrb3Rh?=

    How to set the DataGrid Row Size to a fixed size.

    =?Utf-8?B?QmlkYXJrb3Rh?=, May 19, 2005, in forum: ASP .Net
    Replies:
    0
    Views:
    840
    =?Utf-8?B?QmlkYXJrb3Rh?=
    May 19, 2005
  2. Min-Koo Seo
    Replies:
    0
    Views:
    413
    Min-Koo Seo
    Jun 21, 2004
  3. Joshua Kolden

    fixed type allocator - Intel IPP

    Joshua Kolden, May 28, 2005, in forum: C++
    Replies:
    2
    Views:
    658
    James Daughtry
    May 29, 2005
  4. Replies:
    5
    Views:
    400
  5. Bert_Paris
    Replies:
    4
    Views:
    515
    Bert_Paris
    Jun 6, 2009
Loading...

Share This Page