Re: what is fixed-size memory (de)allocation?

Discussion in 'C++' started by Gianni Mariani, Aug 20, 2003.

  1. baobaoba wrote:
    > I am reading Herb Sutter's "Exceptional C++". In Item 30 about Fast Pimpl idiom,
    > the author mentions fixed-size memory allocation, but he does not provide
    > implementation. Can any body provide some example code or point me to
    > some source for more information about this topic? And what is the difference
    > between fixed-size allocation and memory pool? Thanks a lot.


    An algorithm that manages elements in an array !?

    There is an interesting techniqe where you can reduce the overhead of
    allocating fixed size chunks to virtually 0 if you choose not to
    coalesce blocks and maintain a usually non empty free list. For very
    small sized blocks (4,8,12) bytes this can significantly reduce memory
    utilization. Also, allocation and deallocation costs are very small
    compared to traditional malloc. Unless you have lots (and I mean large
    numbers) of objects of the same and small sizes, just use the default.
    Gianni Mariani, Aug 20, 2003
    #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:
    820
    =?Utf-8?B?QmlkYXJrb3Rh?=
    May 19, 2005
  2. baobaoba
    Replies:
    1
    Views:
    872
    tom_usenet
    Aug 21, 2003
  3. Ken
    Replies:
    24
    Views:
    3,859
    Ben Bacarisse
    Nov 30, 2006
  4. chris
    Replies:
    6
    Views:
    987
    chris
    Oct 28, 2005
  5. Replies:
    5
    Views:
    390
Loading...

Share This Page