![]() |
| | #16 |
| Registered User Join Date: Sep 2006
Posts: 3,150
| You can do that by using a memory model that supports it, if (and only if), you have enough physical (or virtual memory given to the program, from an OS like Windows). The book mentioned has examples of all the Turbo C/C++ key words, in versions 1.0, 1.5, and 2.0. From what I've just read, it basically makes 2 or more memory blocks, appear like one large memory block, to the programmer. I heartily recommend grabbing a copy of this book, if you can find it. It's a treasure trove of everything in early Turbo C/C++, with examples for darn near every single thing. This is the Turbo C/C++ Bible's example for allocating 80,000 bytes: Code:
#include <stdio.h>
#include <stdlib.h>
#include <alloc.h>
int main()
{
int far *bigblock;
if ((bigblock = farmalloc(80000L)) == NULL)
{
printf("Memory allocation failed!\n");
printf("\n\n Press Enter ");
getchar();
exit(1);
}
printf("Block of 80,000 bytes allocated at %Fp\n", bigblock);
printf("\n\n Press Enter");
getchar();
return 0;
}
I played with this for awhile with WindowsXP using the IDE. I couldn't get it to work, but I'm not experienced with messing with all the compiler options, command line interface for it, and etc. Last edited by Adak; 11-16-2007 at 09:52 AM. |
| Adak is offline | |
| | #17 |
| Registered User Join Date: Nov 2007
Posts: 8
| I found what was the problem... My fuction and all my part of cade was called by an interrupt fuction. And this was the problem, becouse in the old machine and especially with my old compiler is very dangerous to call a fuction (a big fuction like mine) with lots of memory allocated and with lots of matematics operation.. But was not easy to found that my code was called by an interrupt fuction! |
| AZ1699 is offline | |
![]() |
| Thread Tools | |
| Display Modes | |
|
Similar Threads | ||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Problem with atl memory cleaning | Mariam1989 | Windows Programming | 1 | 11-11-2008 12:35 PM |
| To find the memory leaks without using any tools | asadullah | C Programming | 2 | 05-12-2008 07:54 AM |
| Memory problem...? | Xzyx987X | Windows Programming | 4 | 06-30-2004 05:02 PM |
| Is it necessary to write a specific memory manager ? | Morglum | Game Programming | 18 | 07-01-2002 01:41 PM |
| Program abort due to memory problem | cazil | C++ Programming | 5 | 01-21-2002 12:55 PM |