flat assembler
Message board for the users of flat assembler.

Index > IDE Development > Fresh string library question

Author
Thread Post new topic Reply to topic
vid
Verbosity in development


Joined: 05 Sep 2003
Posts: 7105
Location: Slovakia
vid 27 Oct 2005, 00:24
to someone familiar with internal working of strlib.asm:
Does the allocated blocks really have to be zeroed? (with HEAP_ZERO_MEMORY)
because if no, then it's just unnescesary slowdown
Post 27 Oct 2005, 00:24
View user's profile Send private message Visit poster's website AIM Address MSN Messenger ICQ Number Reply with quote
decard



Joined: 11 Sep 2003
Posts: 1092
Location: Poland
decard 27 Oct 2005, 04:03
No, it works well without it. But I don't think it slows down memory allocation a lot. It would be only 'rep stosd', right?
Post 27 Oct 2005, 04:03
View user's profile Send private message Visit poster's website Reply with quote
revolution
When all else fails, read the source


Joined: 24 Aug 2004
Posts: 20425
Location: In your JS exploiting you and your system
revolution 27 Oct 2005, 05:12
Quote:
with HEAP_ZERO_MEMORY
Win2k and later ignore this parameter and always zero allocated memory.
Post 27 Oct 2005, 05:12
View user's profile Send private message Visit poster's website Reply with quote
vid
Verbosity in development


Joined: 05 Sep 2003
Posts: 7105
Location: Slovakia
vid 27 Oct 2005, 08:17
well, so i leave it out. Maybe it doesn't slow too much, but itdoes. we can easily clear memory ourselves when we need (and faster)

revolution: typical example of their unability to code. i believe they had bugs because of forgetting to clear memory, so they solved it this way. just like the one, when callback procedure returns to caller address always, regardless what is on the stak.
Post 27 Oct 2005, 08:17
View user's profile Send private message Visit poster's website AIM Address MSN Messenger ICQ Number Reply with quote
revolution
When all else fails, read the source


Joined: 24 Aug 2004
Posts: 20425
Location: In your JS exploiting you and your system
revolution 27 Oct 2005, 09:05
Quote:
i believe they had bugs because of forgetting to clear memory
Actually it is for security to ensure that no information can leak from one process to another by using memory allocations.
Post 27 Oct 2005, 09:05
View user's profile Send private message Visit poster's website Reply with quote
vid
Verbosity in development


Joined: 05 Sep 2003
Posts: 7105
Location: Slovakia
vid 27 Oct 2005, 09:37
that can be it too... Wink
i believe that stack tricking is for security too Smile
Post 27 Oct 2005, 09:37
View user's profile Send private message Visit poster's website AIM Address MSN Messenger ICQ Number Reply with quote
revolution
When all else fails, read the source


Joined: 24 Aug 2004
Posts: 20425
Location: In your JS exploiting you and your system
revolution 27 Oct 2005, 23:48
Quote:
stack tricking is for security too
What is "stack tricking"?
Post 27 Oct 2005, 23:48
View user's profile Send private message Visit poster's website Reply with quote
vid
Verbosity in development


Joined: 05 Sep 2003
Posts: 7105
Location: Slovakia
vid 02 Nov 2005, 11:14
that isn't it's real name.
if you mess stack in winXP callback procedure it returns to real address somehow anyway. i had ugly bug with that, i messed stack, but it still worked on some machines and crashed on others. and it was directx project so crash wasn't very nice, especially on older OSes.
Post 02 Nov 2005, 11:14
View user's profile Send private message Visit poster's website AIM Address MSN Messenger ICQ Number Reply with quote
Display posts from previous:
Post new topic Reply to topic

Jump to:  


< Last Thread | Next Thread >
Forum Rules:
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Copyright © 1999-2024, Tomasz Grysztar. Also on GitHub, YouTube.

Website powered by rwasa.