In which case, realloc returns NULL??? #2

hi pals,

My win32 console application has  allocated memory of  350MB in Memory usage
column and 400MB in Virtual memory column. While reallocating a global
variable , getting NULL if the size is too high (say  200MB). What is the
maximum memory size that an application can use? What are the scenario, that
realloc returns NULL.


@ Shahul.




0
shahul (6)
3/30/2006 1:18:27 PM
vc.mfc 33608 articles. 0 followers. Follow

3 Replies
661 Views

Similar Articles

[PageSpeed] 8

"shahul" <shahul@chellasoft.com> wrote in message 
news:efYasx$UGHA.4608@tk2msftngp13.phx.gbl...
> hi pals,
>
> My win32 console application has  allocated memory of  350MB in Memory 
> usage
> column and 400MB in Virtual memory column. While reallocating a global
> variable , getting NULL if the size is too high (say  200MB). What is the
> maximum memory size that an application can use? What are the scenario, 
> that
> realloc returns NULL.

*alloc uses heap memory. What you would need is VirtualAlloc then. But 
still, a win32 app, cannot address more memory than 4GB (even if you have 
installed more hardware RAM). However, in practise, this memory never will 
go beyond 2GB unless you use specific hardware & software extensions 
(windows (win32) enterprise edition can address 64 GYG)

Still, if you allocate that much virtual memory, your swap disk, really gets 
stressed. I would redesign your solution. If you are talking about a 
database table, or something like that that uses that much memory, use a 
cursor mechanism.


0
3/30/2006 3:34:17 PM
Hi shahul!

> My win32 console application has  allocated memory of  350MB in Memory usage
> column and 400MB in Virtual memory column. While reallocating a global
> variable , getting NULL if the size is too high (say  200MB). What is the
> maximum memory size that an application can use? What are the scenario, that
> realloc returns NULL.

If there is no continues chunck of memory in the requested size. See:

How to get the largest available continues memory block
http://blog.kalmbachnet.de/?postid=9


-- 
Greetings
   Jochen

    My blog about Win32 and .NET
    http://blog.kalmbachnet.de/
0
3/30/2006 3:58:49 PM
On Thu, 30 Mar 2006 18:48:27 +0530, shahul wrote:

> hi pals,..

You're NOT making any "pals" by crossposting to groups that have nothing to
do with your post.  See the link below for information on how to use
newsgroups properly.

Shame on the MVPs who crossposted their responses and set no follow up.  Of
course, if you're using a sad newsreader like OE or Thunderbird...

Follow up set to:

microsoft.public.win32.programmer.directx.sdk


-- 
Please read this before replying:
1. Dshow & posting help:  http://tmhare.mvps.org/help.htm
2. Trim & respond inline (please don't top post or snip everything)
3. Benefit others:  follow up if you are helped or you found a solution
0
phil3996 (17)
3/30/2006 10:44:02 PM
Reply:

Similar Artilces:

Purchase Orders and returns to the suppliers
Hello, In my business model I need to have an ability to return some previously purchased items to my supplier. I thought that I could add a line in Purchase Order with a negative quantity but it is not possible. It would accept the line at the entry time but after saving the PO the lines with negative numbers disappear. I tried to add lines with negative quantities while receive the PO but it does not work as well. Would you know of any way to accountfor returned items to the supplier. I am interacting with Quickbopoks 2003 so this solution would cut my PO processing time considerably...

Email all addresses returned in a sub-form
I have a form that is linked to a sub form. These are connected via a class name so when they user filters the main form to a specific class the sub form returns only the students in that class. The data returned contains email addresses. I would like to have the ability to send an email to everyone in the specified class so I don't have to type each name in order to update the students on scheduling or locations. I can currently send an email to every student in the data base using the following code in a function: strSQL = "SELECT tblEmailList.Email FROM tblEmailList WHERE...

Enter Multiple units and return conversion value for either
I am putting together calculator for glass, in which I would like the user to be able to enter a Square Foot quantity or a Square Meter quantity (Whichever they have readily availible) I have One Column for each What I would like to do is return the converted value in its cooresponding "Entry feild" or cell In other words, If I enter in the SqM Quantity it auto populates the SqFt Quantity and vice versa. Can any one point me in the right direction? Thank you! Dustin, This can be done with a macro, if you are interested. Or a formula in a third column can produce the value ...

select case from combobox and option group
I have an series of actions that need to be executed from differnt types of controls on 2 different forms one control is an option group, the second is a combobox (limit to list = yes) the commands had already been moved to a sub, SetPresetOptions(frm as Access.form) <call SetPresetOptions(me) > , which is located in the same module as the option group (and can be moved to a differnet module if needed) the code reads something like this: Select Case optSetPresetOptions case = 1 do something case = 2 dosomething else case = .... Ho...

Are attribute values case sensitive?
I know that elements and attribute names are case sensitive, but are the actual attribute values case sensitive when referred to from within an xsl stylesheet for example? Thanks, Kathy *** Sent via Developersdex http://www.developersdex.com *** Don't just participate in USENET...get rewarded for it! "Kathy Burke" <kathyburke40@attbi.com> wrote in message news:e$wBHf5iDHA.624@TK2MSFTNGP11.phx.gbl... > I know that elements and attribute names are case sensitive, but are the > actual attribute values case sensitive when referred to from within an > xsl styleshee...

"Ghost" sheet objects returned while using Excel.Application
I am trying to parse a spreadsheet using JavaScript and I'm finding "ghost" Sheet objects in the file. It seems that if the user copied and renamed the file and then deleted some tabs that those tabs are still accessible programmitcally. If I view the excel file in Excel or try to load it into SQL Server then the "ghost" tabs don't show up. But if I read it using the Excel.Application in JavaScript then they show up. Here's an excerpt of what I'm doing: var wb = XLS.WorkBooks.Open(fname); var ws = XLS.Sheets; var cell = null; var e = new Enumerator(XLS....

CRM Data Migration 1.2 Failure 02-14-05
I try to use the Data Migration Framework to my swedish version of CRM 1.2, but get the message "The version of the CDF database you are attempting to use does not match the version of your Microsoft CRM database" when trying to initialize the CDF Database. Doesn´t the Migration Framework support any other versions but the english version? Any clues on this? Any help is greatly appriciated. Thanks, Gunnel Hi, You need an update: Microsoft CRM Update for Data Migration Framework: 831202 which is awailable here: http://www.microsoft.com/downloads/details.aspx?amp%3Bd...

Cannot Omit or Change Name When Printing in Memo Style- Office 2003 #2
Cannot Omit or Change Name When Printing in Memo Style by outlook 2003. Any help is appreciated. Leila ...

Service Pack 2 for Outlook 2003 available #2
Hello NGs, Service Pack 2 for Office 2003 is now available! http://www.microsoft.com/downloads/details.aspx?displaylang=en&FamilyID=57e27a97-2db6-4654-9db6-ec7d5b4dd867 X'Posted to: microsoft.public.outlook,microsoft.public.outlook.general,microsoft.public.outlook.installation X'Posted to: microsoft.public.outlook,microsoft.public.outlook.general,microsoft.public.outlook.installation F'up2: microsoft.public.outlook -- Best Regards Christian Goeller Some misspellings, grammatical or linguistical mistakes found? All corrections would be appreciated! ...

Access 2007 Lookup not returning records in Form
Hi. I created a db in 2007 version of Access using the "Projects" Template , however, saved as mdb file (I am the only one in my dept that has the higher version). I created a lookup field in a form which has a few subforms and contains all of my Projects from the Projects table. When I pick from the drop down list and select a different project, my form information does not reflect the fields associated with that project. It doesn't matter which Project I pick, the info stays the same. What is bizarre is that when I put the db on a shared area/server for others to ac...

Message looping #2
I'm getting this message in my event viewer and nothing changed in our IMC so not sure what happened. The message from the spool file F375XRCQ seems to be looping through the routing extension for the Internet Mail Service. Please check that the routing DLL is configured properly. Event ID 4115 Source MSExchangeIMC Thanks for the help, rocheleau_ron@sympatico.ca One thing that will cause this is custom recipients with the primary smtp addresses set to the local domain suffix. -- regards, Michael Abbaticchio MVP for Exchange Server http://mvps.org/exchange "Ronald Rochelea...

Letter case problem
I try to use a lowercase letter i in a cell, just as a bale for a list of items, all by itself, and Excel insists on changing it to an uppercase I. It does not make any difference if I specify that the cell is text. In fact, nothing I have found solves this problem. Does anyone know how to make Excel behave in this case? "docbnj" <psboyer@patmedia.net> wrote in message news:1143390556.519705.230640@j33g2000cwa.googlegroups.com... >I try to use a lowercase letter i in a cell, just as a bale for a list > of items, all by itself, and Excel insists on changing it to an...

Case Lookup 04-21-06
Is there a way to prevent resolved cases from appearing in the case lookup? Specifically... Create an email in Outlook. Click the 'Track in CRM' button. Click the 'Regarding' button. Change the 'Look For' to Cases. Currently this lookup displays all cases with no restrictions. I would like to restrict this to only show active cases. ------=_NextPart_0001_2F86B88A Content-Type: text/plain Content-Transfer-Encoding: 7bit Hi Cindy, Thanks for the post. I will have to take a look at this to see if there is a way to filter the view. A quick glance at the issu...

Outlook Calender #2
Since upgrading from Office 97 to Office XP the ability to edit existing calendar appointments has gone. Has anyone experienced this and come up with a solution? Please define "gone." Error messages, unexpected results, what??? --� Milly Staples [MVP - Outlook] Post all replies to the group to keep the discussion intact. After searching google.groups.com and finding no answer: Nick <qubic808@nildram.co.uk> asked: | Since upgrading from Office 97 to Office XP the ability to | edit existing calendar appointments has gone. Has anyone | experienced this and come up with a ...

How can I use fill hand to copy the fomula in this case?
Here is my fomula: B1: =sheet2!A1 B2: =sheet2!A4 B3: =sheet2!A7 B4: =sheet2!A11 ......... Is it possible to use fill handle to copy the fomula automatically in my case?, If so, how? Thanks. Sabrina I assume that B4 should read = sheet2!A10 with a help column in sheet1 enter the first function in B1 and fill that down the column enter in C column a series of 1<><>2<><>3<><>and extend that down th column do a sort on C column delete the surplus rows Sabrina Wrote: > Here is my fomula: > B1: =sheet2!A1 > B2: =sheet2!A4 > B3: =sheet2!A...

change lower case text to upper case text
is it possible to change lower case text to upper case text in microsoft excel 2000 Yes, in an empty column enter =UPPER(A1) and copy down, in that column Copy > Paste Special > Values to lose the formulas, then Cut > Paste back to the original location. If you want to use code, see you Jimmy here, http://www.mvps.org/dmcritchie/excel/proper.htm Regards, "rotty" <rotty@discussions.microsoft.com> wrote in message news:C15B5928-15B4-4AE6-8486-F86589685F77@microsoft.com... > is it possible to change lower case text to upper case text in microsoft > excel 2000 Y...

Yahoo email #2
how do i get my yahoo mail in outlook 2003 Did you bother to read any of the messages here from the last couple of days? --� Milly Staples [MVP - Outlook] Post all replies to the group to keep the discussion intact. All unsolicited mail sent to my personal account will be deleted without reading. After furious head scratching, jmslgn asked: | how do i get my yahoo mail in outlook 2003 On Sun, 30 Apr 2006 21:25:01 -0700, jmslgn <jmslgn@discussions.microsoft.com> wrote: >how do i get my yahoo mail in outlook 2003 If you're using a yahoo.com email address, you need a p...

Reading data into a 2 dimensional array
My original post on this appears to have disappeared, so here goes again. I want to do some complex analysis on some data in a spreadsheet. I would like to use a macro but don't know how to 'read' the data from the spreadsheet into a 2 dimensional array. Back in the old days of programming in GWBASIC, I would have used lines as follows : DIM TABLE(100,40) FOR I = 1 TO 100 : FOR J= 1 TO 4 READ TABLE(I,J) NEXT J: NEXT I I know that macros can handle FOR/NEXT loops but what about getting the data from a range say A1:D100 Thanks again in advance Under Pressu...

remember password #2
When I created a new exchange email account in outlook 2002 I did not check "remember password". I want to go back and check the box. I cannot find it anywhere. I know where it is for POP3 accounts and I even tried deleting the protected storage registry entry that is the cause of some password problems. Any Ideas??? Thanks Bill Galloway You can look at 2 places: Control Panel->Mail Icon. In Outlook-> Tools->Email accounts->View or change after highlighting your Exchange account. --� Milly Staples [MVP - Outlook] Post all replies to the group to keep the disc...

Pivot table problems #2
Hi I created a pivot table from several sheets, using the multiple consolidation option. My data is all the same with headings: Name Nationality 1936 (Note this is points scored, but the pivot will show points for the year 1936, 37 etc, then sum them) Fred England 15 etc etc The pivot shows Page1 All Sum of Value Column Row 1936 1937 Nationality Grand Total Fred 15 6 0 21 etc So, I really want the Nationality to show 'England' and not 0 and be alongside riders name In the Pivot Table Field List picker all I...

Outlook setup #2
Hi I have company email account, which i am accessing through outlook web access. I dont have pop3 and smtp information. can i access my mails though outlook express through http protocol, similar to hotmail on outlook express Thanks in advance Krishna ...

Electronic Transfers #2
REPOST Once a week I send an electronic transfer from my checking to savings account. Once I download the transactions from the bank, the transfer from the checking account always matches up with the electronic download. However, the electronic transfer (deposit) into the savings account never matches, even though the date is the same and the amount of the electronic download. I have to "change" change the transaction, open up the transaction window for the saving account and check the transfer that was just completed. I have a similar transfer from checking to kids savings account....

Salary USD$4 ten thousand dollars every week #2
Salary USD$4 ten thousand dollars every week Film http://www.probuilderplus.com/htdocs/powerline2.swf We Don't Leave Anything Up to Chance. Just plug into our proven 3-Step Wealth Generation System. 1. No Selling! 2. No Meetings! 3. No Pressure! FREE join than see the website http://favorjean.probuilderplus.com/ I thought it was just hype, but... ...

Customization
Hi there, I'm new to CRM and trying to customize it. I've got some question. I hope there's someone to help me out...please...:( 1. How can I rename the case status: Active and Resolved to Open and Closed? 2. I need to customize My Active Case View. When the user select the view, is there any way to show the shared cases? Thank you in advance, semaj ...

Compiler directive. #2
A utility function that I use utilizes a library that I never needed before, "Shlwapi.lib". I'm just using something out of that library. I don't even know what "Shlwapi" means. So now for every program that uses my utility function, I have to add "Shlwapi.lib" to the linker project settings. Is there a compiler directive or pragma or something that I can place in the ..cpp source file that automatically makes the compiler environment use Shlwapi.lib without me having to manually add it to the project settings? "Paco" <paco_beams@g...