Board index » delphi » Memory management

Memory management

Art McGinnis
fing...@airmail.net
(214) 373 6198

Note: The character before the '@' in my e-mail address is the number
      one, not the letter 'L'. I plan to change this.

Dear Newsgroup:

    How do I turn a graphics procedure or unit into an .obj file so that
my main program can place a call to it? Or should I use the Exec
procedure to launch it from within the program? It's my understanding
that a graphics unit can't be turned into an overlay.
    Also, how do I pass data from that .obj/program file so that my main
program can access it? Could the .obj/program place the needed data
directly into some pre-designated memory addresses so that the main
program could access them through pointers, then remove them?
    When a program terminates, its data is removed from the heap (and
from memory), right?
    Please excuse all the questions. I will appreciate any advice you
can give me.
    Thank you.
                                Sincerely,
                                Art McGinnis

 

Re:Memory management


Quote
fingal arthur mcginnis wrote:
> Art McGinnis
> fing...@airmail.net
> (214) 373 6198

> Note: The character before the '@' in my e-mail address is the number
>       one, not the letter 'L'. I plan to change this.

Note to your note:  It's not that big of a deal; on many fonts the difference
is discernable, and in order to get an e-mail reply, all that usually matters
is that the newsreader can handle the address, not the user.  It might make a
difference to a scant few who'd have to duplicate it by retyping it, but in
this era of object-oriented systems, those lacking cut 'n paste ability will
probably have text terminals where "l" and "1" are discernible.

Quote
> Dear Newsgroup:

>     How do I turn a graphics procedure or unit into an .obj file so that
> my main program can place a call to it? Or should I use the Exec
> procedure to launch it from within the program? It's my understanding
> that a graphics unit can't be turned into an overlay.

I think you're either confused, mistaken, or both.  What *is* true is that the
standard GRAPH unit (along with SYSTEM, OVERLAY, CRT, TURBO3, and GRAPH3)
cannot be placed into an overlay.  In any case, graphics procedures generally
fall into the category of things you don't want to place into an overlay
anyway.  In theory you probably can, but it will very likely be less efficient
in an overlay.  Treat it like a normal procedure in a unit, and you won't have
any problems with it.

Quote
>     Also, how do I pass data from that .obj/program file so that my main
> program can access it? Could the .obj/program place the needed data
> directly into some pre-designated memory addresses so that the main
> program could access them through pointers, then remove them?

This seems a bit frivolous and pointless.  I really don't see what you're
getting at here.

Quote
>     When a program terminates, its data is removed from the heap (and
> from memory), right?

In practical terms, right.  In actual terms, no:  The heap becomes undefined.

Quote
>     Please excuse all the questions. I will appreciate any advice you
> can give me.

If you're interested in making use of overlays, the Language Guide has a full
chapter covering the nuts and bolts you need to know.

Quote
>     Thank you.
>                                 Sincerely,
>                                 Art McGinnis

--
Scott Earnest            | SPAM protection in effect. Remove  |
setech@_ix.netcom.com    | "_" as needed for true addresses.  |
earnests@_homenet.lm.com |    UIN:1136443  EFnet:pale_blue    |
sinykal@_{*word*104}space.org  | URL: http://www.netcom.com/~setech |

Other Threads