|
|
How many are limitation of stack memory!?
I think the stack memory usage per process vary throughout OS's but 180MB is unlikely possible.
And if we need huge memory in global, how can we do it?
uh?...You will of course have to allocate them from the heap.
|
|
|
|
|
but i heard in windows platform, every process can access up tp 4 GB of memeory. (2^32) ????
I want to change Myself..Can u help me?
|
|
|
|
|
|
renjith_sree wrote:
but i heard in windows platform, every process can access up tp 4 GB of memeory. (2^32) ????
I doubt its 4 gb, windows reserves 2gb kernel and 2gb for user applications.
God is Real, unless declared Integer.
|
|
|
|
|
Assuming 'global' means that my_arr is declared outside any function then the stack doesn't come into it.
What's happening is that the executable is being marked as needing more than 180M of memory and this much is reserved in the virtual address space of the process, but until you write (or read....) that memory it isn't actually allocated for real, in some cases you will never be able to have it all as real memory at once, it will be paged in and out from the pagefile as required. This is transparent apart from the slowness.
Anyway look at the 'VM Size' column in Task Manager (View->Select Columns, if necessary) I think you will find this shows a more likely amount.
I cannot explain why your program terminated abnormally unless you incorrectly accessed the array or your pagefile isn't big enough. Perhaps you could extract a small sample of the code you're using to access the array? I suspect you have an error in parameter order to that unwieldy array and are writing off the end.
Anyway the following code runs to completion and you end up with a 'mem usage' of 180M.
typedef struct{
char buff[20];
} my_struct;
my_struct my_arr[1000][30][10][10][3];
int main()
{
for ( int a = 0; a < 1000; ++a )
for ( int b = 0; b < 30; ++b )
for ( int c = 0; c < 10; ++c )
for ( int d = 0; d < 10; ++d )
for ( int e = 0; e < 3; ++e )
{
my_arr [ a ][ b ][ c ][ d ][ e ].buff [ 0 ] = '0' ;
my_arr [ a ][ b ][ c ][ d ][ e ].buff [ 19 ] = '9' ;
}
return 0;
}
Paul
|
|
|
|
|
I would like to be able to read a dialog template resource at compile time, for example I want to make sure before the program calls myDlg.Create(129/*IDD_DIALOG1*/, this) :
1) Is 129 a valid dialog template resource ID?
2) If yes, does the dialog associated with that template have WS_CHILD and WS_CAPTION style flags set?
Thank you.
|
|
|
|
|
|
FindResource() should do what you want. Also, check out EnumResourceNames() and EnumResourceTypes() .
"The pointy end goes in the other man." - Antonio Banderas (Zorro, 1998)
|
|
|
|
|
Heya,
I just did a search on the board and I got some different answers to this but I don't know which method to go for
What I have is a dialog template consisting of a tree control and now I want to add this tab control (property sheet) to it as well.
That is, I cannot just derive my dialog from the CPropertySheet class since I want other stuff on the dialog as well.
What's the best way to achieve this? Should I create a tab control and then somehow add property pages to each tab? If not, then how could I position the property sheet on before hand in the resource editor, etc.
Huge thanks in advance
|
|
|
|
|
I had a similar problem and i solved it this way.
Put a placeholder like static control on the dialog template that would be occupied by the propertysheet.
Then on the initdialog of the dialog, Create the propertysheet dynamically, add the pages, and use SetWindowPos to place the propertysheet at the static control placeholder.
I am not aware of anyother way.
God is Real, unless declared Integer.
|
|
|
|
|
Thanks for the fast answer
I thought of this myself.. I'd hoped for a more..uhm.. non-hack way, but seems I'll have to go for this one (if I don't get anymore replies)
Thanks again for your time
|
|
|
|
|
I know this works for sure, coz i have used it but only problem i have is the tab order, the propertysheet never gets control when tabing on the dialog, once the propertysheet is focused then tabing does not goes to other controls on the dialog.
God is Real, unless declared Integer.
|
|
|
|
|
You can embed the property sheet as a child control within the dialog. The Construct method in CPropertySheet should help.
Software Zen: delete this;
|
|
|
|
|
But then how do I position it correctly (the sheet)? Using a placeholder like Mr.Prakash suggested?
Looking forward to a little elaboration
|
|
|
|
|
Halloko wrote:
Using a placeholder
That's the easiest way.
Software Zen: delete this;
|
|
|
|
|
In my project i need run an executeable file inside a vc++ program. can any one please guide with some suggestion
|
|
|
|
|
shellexecute
createprocess
spawn
etc etc
what exactly else do u need from it?
"there is no spoon" biz stuff about me
|
|
|
|
|
Capturing console output may be ?
God is Real, unless declared Integer.
|
|
|
|
|
plz can i get source code in c or c++ to run an batch file.
|
|
|
|
|
shiva shankar wrote:
plz can i get source code in c or c++ to run an batch file.
in C, or c++ (in dos mode)
call
system("c:\\yourbatch.bat");
include process.h file
I want to change Myself..Can u help me?
|
|
|
|
|
whenever a folder is renamed with extension of system folders such as recycle bin,favorites etc., the data in it gets hidden.
how can i implement this using vc++
milind
|
|
|
|
|
refer IShellChangeNotify interface
I want to change Myself..Can u help me?
|
|
|
|
|
I'm programming an application on Sun platform.I should need to get constructor information for any struct.My program defined many struct types,i want to builde a generic arithmetic to process anyone of all struct variables.Therefore i must get members and its types of struct on run time.How can i do for it? Thank you for presenting me some helps.
|
|
|
|
|
Interesting. One possible solution is a map. Another solution is dynamic casting. Derive the structure from an interface.
Kuphryn
|
|
|
|