malloc vs. _fmalloc - Programmers Heaven

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories

malloc vs. _fmalloc

I'm using an old version of C for Ms-DOS and I am using

_fmalloc for a lot of my background graphic buffers.

I see far pointers all over code for accessing the video

card registers, such as RGB values are in (unsigned char far *).


I don't think that there is a speed difference between

malloc and _fmalloc... Is there?

If not, then why does most the graphics code for Ms-DOS use far

pointers and _fmalloc? Is this just some sort of

neat way to save memory?


Comments

  • : I'm using an old version of C for Ms-DOS and I am using

    : _fmalloc for a lot of my background graphic buffers.

    : I see far pointers all over code for accessing the video

    : card registers, such as RGB values are in (unsigned char far *).


    : I don't think that there is a speed difference between

    : malloc and _fmalloc... Is there?

    : If not, then why does most the graphics code for Ms-DOS use far

    : pointers and _fmalloc? Is this just some sort of

    : neat way to save memory?


    far pointers can access 640k,but near pointers can only access 65k.


Sign In or Register to comment.