Re: e3 flavors

From: Michele Andreoli (m.andreoli@tin.it)
Date: Fri Dec 08 2000 - 22:33:00 CET


On Fri, Dec 08, 2000 at 08:48:53PM +0100, Albrecht Kleine nicely wrote:
>
> n=read(fd2[0],buf,20480);
> // never got more than 4096 byte!
>
> How this is to change to pass data up to 1 MB to sed and vice versa
> w/o blocking?
>

Maybe, you are facing with the virtual memory management in the
linux kernel? 4096 byte seems to be the PAGE_SIZE. What is the
syscall you are using? kmalloc or similar?

Why do not assume this more semplicist approach:

                1. copy the buffer in a file, such /tmp/buffer
                2. run sed on /tmp/buffer
                3. reload the buffer?

It is ugly, but do not use pipes or additional ram.

Michele

-- 
In summing up, I wish I had some kind of affirmative message to leave
you with, I don't. Would you take two negative messages? - Woody Allen
---------------------------------------------------------------------
To unsubscribe, e-mail: mulinux-unsubscribe@sunsite.auc.dk
For additional commands, e-mail: mulinux-help@sunsite.auc.dk


This archive was generated by hypermail 2.1.6 : Sat Feb 08 2003 - 15:27:17 CET