Allocator

This is a discussion on Allocator within the C++ Programming forums, part of the General Programming Boards category; Hi, I've been reading up on Allocators, but I am still unsure as to their exact function. Could anybody please ...

  1. #1
    Registered User
    Join Date
    Feb 2009
    Posts
    329

    Allocator

    Hi,

    I've been reading up on Allocators, but I am still unsure as to their exact function.

    Could anybody please offer a simple explanation as the internet resources I have found are not that clear to me.

    Thanks,

    Darren.

  2. #2
    C++まいる!Cをこわせ! Elysia's Avatar
    Join Date
    Oct 2007
    Posts
    22,173
    An allocator controls how memory is allocated and freed, basically.
    The default allocator will use new[] and delete[]. You can make your own that uses different sources for allocation, if you wish. That is the basic idea anyway.
    Quote Originally Posted by Adak View Post
    io.h certainly IS included in some modern compilers. It is no longer part of the standard for C, but it is nevertheless, included in the very latest Pelles C versions.
    Quote Originally Posted by Salem View Post
    You mean it's included as a crutch to help ancient programmers limp along without them having to relearn too much.

    Outside of your DOS world, your header file is meaningless.
    For information on how to enable C++11 on your compiler, look here.
    よく聞くがいい!私は天才だからね! ^_^

  3. #3
    Registered User
    Join Date
    Feb 2009
    Posts
    329
    Thanks Elysia,

    That makes sense now.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Semaphore design in slab allocator
    By claudiu in forum C Programming
    Replies: 1
    Last Post: 03-02-2010, 08:46 PM
  2. define max length for allocator
    By George2 in forum C++ Programming
    Replies: 4
    Last Post: 02-28-2008, 08:07 PM
  3. allocator implementation
    By George2 in forum C++ Programming
    Replies: 4
    Last Post: 02-28-2008, 04:39 AM
  4. Allocator
    By Scarvenger in forum C++ Programming
    Replies: 2
    Last Post: 01-08-2008, 09:30 AM
  5. storage allocator without malloc
    By lectrolux in forum C Programming
    Replies: 8
    Last Post: 05-07-2003, 05:43 AM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21