| TIP: Click on subject to list as thread! | ANSI |
| echo: | |
|---|---|
| to: | |
| from: | |
| date: | |
| subject: | Re: Auto string-length d |
G'Day Michael,
-=> Quoting Michael Stapleton to Frank Adam <=-
MS> without C++; an OOP oriented language like C++ just keeps things
MS> less cluttered by hiding the details.
FA> Yeah,but those derived structures are driving me bananas.;-)
C'mon, you were supposed to laugh at this, there are no derived
structures.:-)
Although in C++ a struct is treated as a class methink.
MS> Fair enough. FWIW, I'm almost totally ignorant of C++, but I have
Classes can be derived from a base class.This means that you can have
a number of classes having access to the base class' even though the
variables there may be private.
(not sure about protected, haven't touched C++ for a while).
MS> Interesting... I wonder what it'd do on my Amiga... :) I've
MS> seen PC programmers talking about "the heap" and I guess it's
MS> where malloc() gets its memory, but the rest is a mystery.
MS> Memory allocation is more anarchic over here. :)
FA> It would still have to return handles of blocks to the program's
FA> RTL ?
MS> I'm not exactly clear on what you mean by the program's RTL.
The Run Time Library.
Most DOS calls are handled by it, if you disassemble a DOS exe you'll
see a lot of mov ah 30h
int 21h
cmp ??..
Because the RTL has to determine what platform you're running on,
so it can use the appropriate DOS function and variables.
For instance in asm you would go straight to DOS and grab a chunk, but
it's my belief that a routine in the Borland RTL intercepts all alloc
calls and builds an internal memory table, so non standard stuff like
heapwalk() can function.
MS> There are several varieties of memory allocation in the Amiga OS, as
MS> well as the standard allocation functions provided by the compiler.
MS> If I use malloc() or AllocVec(), then I can find the blocksize at a
MS> negative offset from the returned pointer. OTOH, if I use
Yeah, i though i could too, but when i used a different compiler it didn't
work.(Pacific to be exact.)
MS> called AllocRemember, which returns size & other information via a
MS> structure double pointer.
Hm, DOS must be a bit more senile.
I've read/tested the DOS memory functions now a few(hundred?) times, but i
can't find any reliable way of finding out the size. After it allocates
it just returns the number of blocks and the size is history from there
on.
It still bugs me, there HAS TO BE a table within DOS somewhere !
L8r Frank (fadam{at}ozemail.com.au).
___ Blue Wave/DOS v2.21
---
* Origin: Melbourne PC User Group BBS (3:632/309)SEEN-BY: 3/103 50/99 620/243 623/630 632/50 107 108 271 309 348 360 371 504 SEEN-BY: 632/525 530 533 535 562 601 635/503 544 728 639/252 711/409 410 413 SEEN-BY: 711/430 808 809 932 934 712/515 713/317 714/906 800/1 @PATH: 632/309 107 360 50/99 711/808 934 |
|
| SOURCE: echomail via fidonet.ozzmosis.com | |
Email questions or comments to sysop@ipingthereforeiam.com
All parts of this website painstakingly hand-crafted in the U.S.A.!
IPTIA BBS/MUD/Terminal/Game Server List, © 2025 IPTIA Consulting™.