|
Well I see you agree with me (and Rajesh, I suppose): C/C++ 's NULL is more imperative than C# cheap fake one.
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong.
-- Iain Clarke
[My articles]
|
|
|
|
|
Hear hear...
It is a crappy thing, but it's life -^ Carlo Pallini
|
|
|
|
|
Hi All,
i have one win32 exe and after executing it, in the task manager the memory usage is increasing even there is nothing to process for exe.At the starting its size is 150kb but it is increasing up to 10 mb. so please can anyone tell me the possible reasons and solutions.
Thanks A Ton
Ash_VCPP
walking over water is just knowing where the stones are.....
|
|
|
|
|
you have memory leak.
check your program that every new function match a delete function.
remember to release every resource you have got.
|
|
|
|
|
hi,
i checked new/delete sequence there is all fine, is there anything else which can cause memory leak or how can i detect memory leak...
Thanks A Ton
Ash_VCPP
walking over water is just knowing where the stones are.....
|
|
|
|
|
|
You have got tools to detect whether you have a memory leak. Search for BoundsChecker or Rationals Purify plus.
You need to google first, if you have "It's urgent please" mentioned in your question.
_AnShUmAn_
|
|
|
|
|
Hi Anshuman,
i serched for both the tool and i think purifyplus is free downlable but i dont know how to use it so can you please tell me which tool ishould use(depending its a freeware) and where i can get details of using the tool as i didnt got anything on it after googling....
Thanks A Ton
Ash_VCPP
walking over water is just knowing where the stones are.....
|
|
|
|
|
Does your debugger report memory leaks in the output window after your binary finishes execution (in debug mode)?
It is a crappy thing, but it's life -^ Carlo Pallini
|
|
|
|
|
actually i used dbgcntrl apis which shows me dumped memory leaks like this:
strcore.cpp(118) : {83} normal block at 0x008C2F50, 156 bytes long.
Data: < Prov> 01 00 00 00 8F 00 00 00 8F 00 00 00 50 72 6F 76
strcore.cpp(118) : {80} normal block at 0x008C10B0, 33 bytes long.
Data: < C:\P> 02 00 00 00 14 00 00 00 14 00 00 00 43 3A 5C 50
strcore.cpp(118) : {77} normal block at 0x008C1150, 18 bytes long.
Data: < 5555> 01 00 00 00 05 00 00 00 05 00 00 00 35 35 35 35
strcore.cpp(118) : {74} normal block at 0x008C1190, 26 bytes long.
Data: < 192.> 01 00 00 00 0D 00 00 00 0D 00 00 00 31 39 32 2E
{62} normal block at 0x008C14B0, 33 bytes long.
Data: < C > 00 43 00 CD CD CD CD CD CD CD CD CD CD CD CD CD
{61} normal block at 0x008C1500, 40 bytes long.
Data: < |L > 14 7C 4C 10 16 00 00 00 00 00 00 00 00 00 00 00
{59} client block at 0x008C1610, subtype 0, 64 bytes long.
a CDynLinkLibrary object at $008C1610, 64 bytes long
{54} client block at 0x008C1790, subtype 0, 64 bytes long.
a CDynLinkLibrary object at $008C1790, 64 bytes long
{52} client block at 0x008C18B0, subtype 0, 64 bytes long.
a CDynLinkLibrary object at $008C18B0, 64 bytes long
Object dump complete.
but i dont have strcore.cpp file in my workspace and i dont understand the meaning of other errors....
Thanks A Ton
Ash_VCPP
walking over water is just knowing where the stones are.....
|
|
|
|
|
Hi,
these add up to a few KB at most, and won't explain what you are seeing. So there probably is no memory leak.
Are you allocating some large data structures, say an array of several MB, even when there isn't any reason to already allocate such?
|
|
|
|
|
Actually i am receiving some data from server which i am taking in a char * array and after end of story i am deleting it.....and there is nothing big array i am processing with axcept above one....
Thanks A Ton
Ash_VCPP
walking over water is just knowing where the stones are.....
|
|
|
|
|
Ash_VCPP wrote: {62} normal block at 0x008C14B0, 33 bytes long.
Data: < C > 00 43 00 CD CD CD CD CD CD CD CD CD CD CD CD CD
{61} normal block at 0x008C1500, 40 bytes long.
Data: < |L > 14 7C 4C 10 16 00 00 00 00 00 00 00 00 00 00 00
{59} client block at 0x008C1610, subtype 0, 64 bytes long.
There are probably source files where new isn't redefined to DEBUG_NEW (probably you added some C/C++ files yourself?). Try to add this definition to all the source files where it isn't present:
#ifdef _DEBUG
#define new DEBUG_NEW
#endif
This will enable the debugger to display the exact line numbers in your program where there were memory allocations (that weren't cleaned up).
Ash_VCPP wrote: but i dont have strcore.cpp file in my workspace and i dont understand the meaning of other errors....
Leaks at strcore.cpp most likely means that you are misusing strings in your program (improper shutdown/termination of a thread that was using strings?). That becomes too much of a big topic to discuss in a reply.
It is a crappy thing, but it's life -^ Carlo Pallini
|
|
|
|
|
If your codes is not very long,put it out. We can find the problem for you. I think that must be a memory leak.
I am a Chinese boy.My English is poor...
|
|
|
|
|
I have a little confused by how to calculate the duration of AAC audio,i read the ISO/IEC 13818-7,but find no answer,now i don't know where to find the formula to calculate the duration.
I can get the sample rate(ADTS) or bit rate(ADIF),maybe it's no use of calcalating the duration,who can help me?thanks.
I'm sorry for my poor english.
|
|
|
|
|
Hello Friends
Can i include header file at run time? and how?
|
|
|
|
|
Why would you ever need to do something like that ?
|
|
|
|
|
Actually i hv to update a mesh that i m creating .I m getting all that information in header file and i hv to include that file .But every time i cant include it manually na?Thats y i need it.
Psuedocode:
fn(){
// creating a header file with name sample.h
________
_______
___
#include"sample.h"
}
so inspite of giving it manually I want at run time.
|
|
|
|
|
If you don't want to rebuild every time the header file changes, you're going to have to add code to read that file at run-time and interpret and use the information in it.
Java, Basic, who cares - it's all a bunch of tree-hugging hippy cr*p
|
|
|
|
|
yes,exactly like that.Is any other way to do it.
|
|
|
|
|
That's probably about the easiest way to do it without calling the C compiler from your program, compiling the header into some DLL or something and using that from your program. Yeah, that's definitely the easiest way to do it.
Java, Basic, who cares - it's all a bunch of tree-hugging hippy cr*p
|
|
|
|
|
You can't do something like that without recompiling your program (which I guess you don't want to do). What you will need to do is instead load your data from a file and store it in a structure in memory.
|
|
|
|
|
yogeshs wrote: Actually i hv to update a mesh that i m creating
You are doing some 3D stuff I guess ? How are you creating your mesh ? How do you 'export' it (what the data structure you are using to store it) ?
|
|
|
|
|
yes,i m working in 3d.I m saving all my data in class and using that data but that is not working when i tried with header file then it works thats y i was asking for run time header file.
Do u have any idea to do that?
Yogesh
|
|
|
|
|
Yes, like I said earlier you have to save it in a file: either binary format or your own format. But I asked some information and you didn't provide any usefull information, so it will be difficult to help you.
I guess you don't really understand what I and Stuart are telling you about these files. Ok, let me explain you that another way: when you save a word document for instance, everything gets saved to a file and when you load the document, Word opens this document and read the information out of it. Well, you have to do something similar in your application: you load your data from the file. Thus you will need to use CFile or std::ifstream to read the file contents and store them in memory.
yogeshs wrote: Do u have any idea to do that?
Forget about that idea of runtime header, that's not something which is possible.
|
|
|
|