Hello everyone,
I heard some points that the memory allocated by new does not belongs to virtual memory, and onlymemory allocated by VirtualAlloc belongs to virtual memory.
1.
I think this statement is not correct. Since all memory touched by current process belongs to virtual memory (either reserved or committed). No matter how (through which API) developer is using.
2.
And new always utilize VirtualAlloc in underlying internal implementation code, so new (in implementation point of view) will consume virtual memory -- the same as what VirtualAlloc does.
Are my points (1) and (2) correct?
thanks in advance,
George
9 1371
Chapter 13 Windows vis C/C++ Jeffrey Richter 2008.
oler1s 671
Recognized Expert Contributor
I don't know. Well, I don't care to find out for you. Maybe the people here, here, here, and here may have an answer, especially since you asked them all the same question.
By calling new , memory is allocated in heap i.e RAM.
But by callinf VirtualAlloc, means allocating in virtual memory. when you wanna use it, then commit it.
Asadullah ansari
By calling new , memory is allocated in heap i.e RAM.
Of course it's in RAM. The allocation is in the computer. However, by default, new calls VirtualAlloc() in Windows.
Please read Chapter 13 Windows vis C/C++ Jeffrey Richter 2008.
Thanks weaknessforcats,
I agree and I think you mean the memory allocated by new belongs to virtual memory. Right?
Of course it's in RAM. The allocation is in the computer. However, by default, new calls VirtualAlloc() in Windows.
Please read Chapter 13 Windows vis C/C++ Jeffrey Richter 2008.
regards,
George
Please read Chapter 13 Windows vis C/C++ Jeffrey Richter 2008.
Please read Chapter 13 Windows via C/C++ Jeffrey Richter 2008.
Looks like a pretty new book, I can not find it in local book store.
Please read Chapter 13 Windows via C/C++ Jeffrey Richter 2008.
regards,
George
Looks like a pretty new book, I can not find it in local book store.
I got mine at Amazon.com.
Sign in to post your reply or Sign up for a free account.
Similar topics |
by: vikram |
last post by:
hello sir,
plz have patience to read this looooong mail.
i need to design a high speed recording system.
the pci card has a plx chip which provides dma facilty for data
transfer.
for dma i need...
|
by: Olaf Baeyens |
last post by:
I am porting some of my buffer class code for C++ to C#.
This C++ class allocates a block of memory using
m_pBuffer=new BYTE;
But since the class is also used for pointers for funtions that uses...
|
by: Lynn McGuire |
last post by:
Is there a way to force the malloc in VC++ 2003 to use addresses
above 0x12000000 for virtual memory ?
You dont want to know why. It has to do with fortran common
blocks.
Thanks,
Lynn
|
by: AAVarda |
last post by:
Hi,
I have a device that scan's a doc and send's the doc image back. Below is
the function in API to get the Image:
ULONG MTMICRGetImage (
char *pcDevName,
char *pcImageID,
char *pcBuffer,...
|
by: azerty |
last post by:
Hello
I use an old program "TeamManager 97" from Microsoft corp. which use
Access dabase.
before I upgrade my computer to XP SP2, every work fine (with 1 Go of
memory)
After I realise...
| |
by: kumarmdb2 |
last post by:
Hi guys,
For last few days we are getting out of private memory error. We have a
development environment. We tried to figure out the problem but we
believe that it might be related to the OS...
|
by: George2 |
last post by:
Hello everyone,
I heard some points that the memory allocated by new does not belongs
to virtual memory, and onlymemory allocated by VirtualAlloc belongs to
virtual memory.
1.
I think...
|
by: George2 |
last post by:
Hello everyone,
On Windows, when we allocate large amount of memory, new will call
VirtualAlloc directly, other than call HeapAlloc then through
HeapAlloc call VirtualAlloc indirectly?
...
|
by: Lloyd Bonafide |
last post by:
I followed a link to James Kanze's web site in another thread and was
surprised to read this comment by a link to a GC:
"I can't imagine writing C++ without it"
How many of you c.l.c++'ers use...
|
by: =?Utf-8?B?U2VyZ2Vp?= |
last post by:
Dear staff
Can I get your assistance with \3GB (LARGEADDRESSAWARE) switch in mixed mode
process built by VS 2008, please?
I have a mixed mode application: C# GUI calling native C++ DLL through...
|
by: marktang |
last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
| |
by: jinu1996 |
last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
|
by: Hystou |
last post by:
Overview:
Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
|
by: tracyyun |
last post by:
Dear forum friends,
With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
|
by: agi2029 |
last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
|
by: isladogs |
last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM).
In this session, we are pleased to welcome a new...
|
by: conductexam |
last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
| |
by: 6302768590 |
last post by:
Hai team
i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
|
by: bsmnconsultancy |
last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...
| |