The MASM Forum

General => The Workshop => Topic started by: K_F on October 29, 2015, 08:50:31 PM

Title: Don't bend down in front of Memory Management
Post by: K_F on October 29, 2015, 08:50:31 PM
Hell's, I've been screwed over this week by memory management.. :icon_eek:
Changed the memory system and bang.. crash after crash after crash.... oh, crap!!!

Eventually found out (or it worked for me anyway) that when HeapAllocating a few independent blocks... I had to HeapFree all of them, and reallocate.
I couldn't free one block and keep the rest, as my proggie would always crash at the HeapFree API  :shock:
(I do have valid handle checks before HeapFree)

Does this sound right to anyone ??
Title: Re: Don't bend down in front of Memory Management
Post by: hutch-- on October 29, 2015, 09:37:54 PM
No it doesn't actually, is it something silly like having the wrong pointer for the latter ones ?
Title: Re: Don't bend down in front of Memory Management
Post by: K_F on October 29, 2015, 10:26:43 PM
yup.. you're right..

EAX <> EBX... :redface: :redface:

All working again.... I need a beer!!  :t
(http://i.imgur.com/xH2RijW.jpg)
Title: Re: Don't bend down in front of Memory Management
Post by: dedndave on October 30, 2015, 01:18:51 AM
interesting looking project   :P
Title: Re: Don't bend down in front of Memory Management
Post by: K_F on October 30, 2015, 01:41:41 AM
Only one mistake i made.. and it threw me  :biggrin:... this is why I like Masm... you have to do it right first time  8)

Quoteinteresting looking project
It is... I'm doing it  :badgrin: .. joking.

I made this big plan about year ago... although it's been it the brain for about 5 years.. it was a matter of getting down to it.
This is just one of the child windows 'of creation' - the one that gave me the problem to start with..
Must finish the winsync graphing bit.. tomorrow - everything's ready when the memory thing bombed me..

Roll your own filters, add a bit of AI... take a swig of wine.. and bingo... well yes.. bingo! ;)

Title: Re: Don't bend down in front of Memory Management
Post by: Zen on October 30, 2015, 06:27:52 AM
K_F/VAN,
You're writing a signal processing program ???
...In assembly ???    (http://www.conceptart.org/images/ca_smilies/advanced/anj_jawdrop.gif)
Title: Re: Don't bend down in front of Memory Management
Post by: K_F on October 30, 2015, 06:36:08 AM
It's not that difficult... just the small things get you.. like using the wrong register :biggrin:
Most of it is all in place... I was going through the graphic representation (that dark square ).. but got held up a little with this memory management.

I keep on changing things as I find more efficient way of doing things... must control myself  :badgrin: