SetTimer and Thread

2»

Comments

  • [b][red]This message was edited by AsmGuru62 at 2003-4-8 6:51:30[/red][/b][hr]
    : : [blue]Tell me - when you look at the resource meter, can you see the resource consumption 'live'? What I mean: is this meter ALWAYS checks the status in a loop? If so, you can perform different parts of your program and look at the meter, maybe you can pinpoint the component/module which gives this effect? To narrow a code review a little bit...[/blue]
    : :
    : The Resource meter is like the TaskManager of NT that shows the cpu and memory usage. Resource meter constantly checks for available memory resource (System, User and GDI resource) and reports. Well yes, I have monitored the reoursce consumption by performing some activities in our application. There's enuf GDI resoure but only system and user resources are eaten up. During download of files (FTP) it consumes lot of memory. I need to look into this. But there are other areas also which shows high consumption of resource.
    : Leave this alone, I wonder why ever win9x not able to use memory whatever we add. Even if I add 256 or 512 MB of memory, it doesnt help us in any way. Same app runs fine with 64MB on NT and Win2K. Any idea what could be the cause for this.
    : Another question, is there anyway I can check if one process is attempting to write on some other process address space. This could be the worse cause for BSOD.
    :
    : Thanks.
    :
    [blue]The problem is located in the program's code - not in Win9x. If you leak memory FAST - no matter how much you can add - it will just a matter of time before it is 'eaten' up.

    I must say, that some programming techniques are allowed in NT and not in Win9x and that is exactly about releasing resources... pity, that I do not remember exactly what was it about - it was long ago, like 6 years back... no time to look for it now, but you should definitely review the code in question - FTP loader, you said... Anyhow, NT is somewhat forgiving some stuff you do in non-conventional way...

    But in any event, if code is written strictly, like in the manuals - there should be no problems - no matter what Windows system it is executed on.

    P.S. If you need to know if some data being corrupted by another process. Hmmm... good one. You should know, that this cannot happen accidentally in Win32, because of inter-process memory protection. The only way to do it is deliberately code the virus-like program to break into RING0 and do it from there - I hope it is not the case. In any event - you can detect that with a simple checksum. Say you have a structure in memory. Every time you initialize/modify that structure sum up all bytes in that structure (take it with sizeof (STRUCTURE)) and store that value in a structure itself, like a security tag. Before using the structure, add all again and check that sum against the stored value. I know, it is a hassle and slow, but you can do it between some [b]#define[/b] statements, so you can switch it off easily.[/blue]


  • : [b][red]This message was edited by AsmGuru62 at 2003-4-8 6:51:30[/red][/b][hr]
    : : : [blue]Tell me - when you look at the resource meter, can you see the resource consumption 'live'? What I mean: is this meter ALWAYS checks the status in a loop? If so, you can perform different parts of your program and look at the meter, maybe you can pinpoint the component/module which gives this effect? To narrow a code review a little bit...[/blue]
    : : :
    : : The Resource meter is like the TaskManager of NT that shows the cpu and memory usage. Resource meter constantly checks for available memory resource (System, User and GDI resource) and reports. Well yes, I have monitored the reoursce consumption by performing some activities in our application. There's enuf GDI resoure but only system and user resources are eaten up. During download of files (FTP) it consumes lot of memory. I need to look into this. But there are other areas also which shows high consumption of resource.
    : : Leave this alone, I wonder why ever win9x not able to use memory whatever we add. Even if I add 256 or 512 MB of memory, it doesnt help us in any way. Same app runs fine with 64MB on NT and Win2K. Any idea what could be the cause for this.
    : : Another question, is there anyway I can check if one process is attempting to write on some other process address space. This could be the worse cause for BSOD.
    : :
    : : Thanks.
    : :
    : [blue]The problem is located in the program's code - not in Win9x. If you leak memory FAST - no matter how much you can add - it will just a matter of time before it is 'eaten' up.
    :
    : I must say, that some programming techniques are allowed in NT and not in Win9x and that is exactly about releasing resources... pity, that I do not remember exactly what was it about - it was long ago, like 6 years back... no time to look for it now, but you should definitely review the code in question - FTP loader, you said... Anyhow, NT is somewhat forgiving some stuff you do in non-conventional way...
    :
    : But in any event, if code is written strictly, like in the manuals - there should be no problems - no matter what Windows system it is executed on.
    :
    : P.S. If you need to know if some data being corrupted by another process. Hmmm... good one. You should know, that this cannot happen accidentally in Win32, because of inter-process memory protection. The only way to do it is deliberately code the virus-like program to break into RING0 and do it from there - I hope it is not the case. In any event - you can detect that with a simple checksum. Say you have a structure in memory. Every time you initialize/modify that structure sum up all bytes in that structure (take it with sizeof (STRUCTURE)) and store that value in a structure itself, like a security tag. Before using the structure, add all again and check that sum against the stored value. I know, it is a hassle and slow, but you can do it between some [b]#define[/b] statements, so you can switch it off easily.[/blue]
    :
    :
    :

    Thank you. I shall try looking for memory leaks.


  • : [b][red]This message was edited by AsmGuru62 at 2003-4-8 6:51:30[/red][/b][hr]
    : : : [blue]Tell me - when you look at the resource meter, can you see the resource consumption 'live'? What I mean: is this meter ALWAYS checks the status in a loop? If so, you can perform different parts of your program and look at the meter, maybe you can pinpoint the component/module which gives this effect? To narrow a code review a little bit...[/blue]
    : : :
    : : The Resource meter is like the TaskManager of NT that shows the cpu and memory usage. Resource meter constantly checks for available memory resource (System, User and GDI resource) and reports. Well yes, I have monitored the reoursce consumption by performing some activities in our application. There's enuf GDI resoure but only system and user resources are eaten up. During download of files (FTP) it consumes lot of memory. I need to look into this. But there are other areas also which shows high consumption of resource.
    : : Leave this alone, I wonder why ever win9x not able to use memory whatever we add. Even if I add 256 or 512 MB of memory, it doesnt help us in any way. Same app runs fine with 64MB on NT and Win2K. Any idea what could be the cause for this.
    : : Another question, is there anyway I can check if one process is attempting to write on some other process address space. This could be the worse cause for BSOD.
    : :
    : : Thanks.
    : :
    : [blue]The problem is located in the program's code - not in Win9x. If you leak memory FAST - no matter how much you can add - it will just a matter of time before it is 'eaten' up.
    :
    : I must say, that some programming techniques are allowed in NT and not in Win9x and that is exactly about releasing resources... pity, that I do not remember exactly what was it about - it was long ago, like 6 years back... no time to look for it now, but you should definitely review the code in question - FTP loader, you said... Anyhow, NT is somewhat forgiving some stuff you do in non-conventional way...
    :
    : But in any event, if code is written strictly, like in the manuals - there should be no problems - no matter what Windows system it is executed on.
    :
    : P.S. If you need to know if some data being corrupted by another process. Hmmm... good one. You should know, that this cannot happen accidentally in Win32, because of inter-process memory protection. The only way to do it is deliberately code the virus-like program to break into RING0 and do it from there - I hope it is not the case. In any event - you can detect that with a simple checksum. Say you have a structure in memory. Every time you initialize/modify that structure sum up all bytes in that structure (take it with sizeof (STRUCTURE)) and store that value in a structure itself, like a security tag. Before using the structure, add all again and check that sum against the stored value. I know, it is a hassle and slow, but you can do it between some [b]#define[/b] statements, so you can switch it off easily.[/blue]
    :
    :
    :

    Thank you. I shall try looking for memory leaks.


Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories