Re: Referencing a row in a two dimensional array

"SmallHairyTroll <[email protected]>" <[email protected]>
Newsgroups gmane.lisp.corman
Message-ID <[email protected]>
--- In [email protected], JP Massar <massar@a...> wrote:
> At 10:05 AM 3/2/03 +1200, Chris Double wrote:

> If you can turn the GC off at all, then why can't you turn it off 
for
> an indefinite amount of time, as long as you never cons (i.e., 
allocate
> memory), and insure that other threads can't run?
> 
> At some level you don't need to call Lisp functions to store items 
into
> a Lisp array; at some level there is presumably just a pointer to 
a block
> of memory which you can dump bytes into.
> 
> So the innermost innards of READ-SEQUENCE presumably could be
> coded as:
> 
> (WITH-NO-INTERRUPTS
>    (WITH-NO-GC
>       {
>          assembler code that does the equivalent of the C code
>           for (j = 0; j < buf_end; j++)
>            *lisp_array_ptr++ = *stream_buffer++;
>        }
> 
> with appropriate pointer types for different data sizes, of course.
> 
> (Caveat:  I am almost totally ignorant of the inner workings of 
Corman
> and Windows.  So if I am spouting nonsense don't be afraid to tell 
me
> so, and why)

This would still be much slower than the C/C++ equvalient due to the 
inability to use DMA to read e.g. 5 megabytes of data directly into 
memory starting at a known location, with just one function call.

Just how do Lisp's handle huge binary files (multi-gigabyte) ? For 
example, how would the I/O for a video codec be implemented in 
Lisp where the software has to handle an input transport stream of 
19.31 Mbps (high definition video) ?

I suppose one method would be read data into a C/C++ style array 
using the Windows calls "ReadFile" or "ReadFileScatter", and have 
the algorithm implemented in Lisp access the data as required using 
CREF calls.


------------------------ Yahoo! Groups Sponsor ---------------------~-->
Get 128 Bit SSL Encryption!
http://us.click.yahoo.com/LIgTpC/vN2EAA/xGHJAA/SyjtlB/TM
---------------------------------------------------------------------~->

To unsubscribe from this group, send an email to:
[email protected]

 

Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.