[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: C++ Memory allocation
From: |
Robert Heller |
Subject: |
Re: C++ Memory allocation |
Date: |
Wed, 28 Feb 2007 03:48:15 +0100 |
At 27 Feb 2007 16:07:31 -0800 group.JQ@gmail.com wrote:
>
> Hello:
>
> I was told that when we allocate the memory (new) at first time
> in c++, the c++ library will allocate a big block of memory. Later on,
> when we allocate more memory, the c++ library just allocates them from
> that big block of memory instead of getting from the operating system.
> I wonder if it is possible to specify the size of this memory block?
You can overload operator new (and operator delete).
>
> Thanks a lot.
>
>
--
Robert Heller -- 978-544-6933
Deepwoods Software -- Linux Installation and Administration
http://www.deepsoft.com/ -- Web Hosting, with CGI and Database
heller@deepsoft.com -- Contract Programming: C/C++, Tcl/Tk