flat assembler
Message board for the users of flat assembler.

Index > Main > How does OOP concept works at assembly level?

Goto page Previous  1, 2
Author
Thread Post new topic Reply to topic
Teehee



Joined: 05 Aug 2009
Posts: 568
Location: Brazil
Teehee
PS: vid, keep writing that article Very Happy

_________________
Sorry if bad english.
Post 28 May 2011, 19:49
View user's profile Send private message Reply with quote
typedef



Joined: 25 Jul 2010
Posts: 2913
Location: 0x77760000
typedef
Teehee wrote:
well, i know that functions return a handle to the first memory place. And then i need to fill that memory space with my structures. But what if there is no more memory there anymore, i will need to realloc more and copy all the last data to the new handle, or i keep tha last buffer but use the new one?


you can assert ( check for null value at that address )...

TIP: assert is commonly used only when debugging. Wink
Post 29 May 2011, 01:20
View user's profile Send private message Reply with quote
Tyler



Joined: 19 Nov 2009
Posts: 1216
Location: NC, USA
Tyler
assert() is a C prepreocessor macro ie, it's useless for checking for runtime errors. You'll have to check if the handle is 0 the [slightly] harder way.

In general, you don't have to worry about what to do when you run out of memory. It's generally excepted to just print an error message and exit.
Post 30 May 2011, 17:21
View user's profile Send private message Reply with quote
Display posts from previous:
Post new topic Reply to topic

Jump to:  
Goto page Previous  1, 2

< 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-2020, Tomasz Grysztar. Also on GitHub, YouTube, Twitter.

Website powered by rwasa.