Re: OT/drift: when is a RAMdisk an appropriate solution



Tom schrieb:
I have revisited creating a very large array for holding raw data
which is used in an iterative optimization algorithm. The purpose of
the large array is to eliminate the slow hard disk reads and increase
program throughput. On an older machine (Win2000, Visual C++ 6.0, 256
M ram) when I compile with a huge array I get the following warning:

=====================================================================
warning LNK4084: total image size 343744512 exceeds max (268435456);
image may not run
=====================================================================

Thats a linker error. What did you do to the linker?

Just don't use a filescope array, try to malloc() a block of memory, or if
malloc() can't handle that large blocks, allocate multiple chunks of
smaller memory blocks.

You really don't need a ramdisk.

--
Thomas
.



Relevant Pages

  • Re: vasam
    ... Here is the sequel of my previous post "Variable array sizes as members" ... I was given some advice on how to use malloc and realloc in oder to achieve ...
    (microsoft.public.vc.language)
  • Re: vasam
    ... I was given some advice on how to use malloc and realloc in oder to achieve extra storage for certain records of a table. ... then we must allocate some memory dynamically to store a certain amount of longs. ... The difference between this post and my last post is that in the last post I showed that data was stored to eeprom between every record. ... Therefore it means that all the records which have data in lb_itemsarray and the ones that required extra dynamic memory must be kept until the end of the object's life. ...
    (microsoft.public.vc.language)
  • vasam
    ... Here is the sequel of my previous post "Variable array sizes as members" ... I was given some advice on how to use malloc and realloc in oder to achieve ... allocate some memory dynamically to store a certain amount of longs. ... showed that data was stored to eeprom between every record. ...
    (microsoft.public.vc.language)
  • Re: Segmentation Fault...
    ... depends on caller, obviously, who supplied args. ... Again, this depends on *msg. ... All of this is wrapped inside a test for malloc() failing (which ... this winds up represented in the argsarray as an empty string. ...
    (comp.lang.c)
  • Re: [OT] C programming, variable size array
    ... > 'arr' has to be initialized during compilation, ... > it using malloc() and friends. ... About initializing the array as static, well I thought that way, when I ... know of malloc and realoc functoins. ...
    (Debian-User)