From: Shlomi Fish <shlo...@iglu.org.il> > On Wednesday 30 Jun 2010 10:01:45 Yang Zhou wrote: > > Hi Shlomi, > > > > Thanks for your help. > > > > I tried the "my $buffer = "\0" x 65536; " method, but "segmentation fault" > > in the C function remains. > > I know little about "XS", it seems a declaration of the interface between > > Perl and C? Just a glimps of the link in your last mail, I can't find any > > Keyword which can be used to solve this problem. > > > > You need to allocate a buffer for that in your C code using malloc() pass it > to the function and then convert it to something that Perl can understand.
Not necessarily, it is possible to preallocate in Perl and then use that buffer. Please show us your code, preferably trimmed down and let's see. Jenda ===== je...@krynicky.cz === http://Jenda.Krynicky.cz ===== When it comes to wine, women and song, wizards are allowed to get drunk and croon as much as they like. -- Terry Pratchett in Sourcery -- To unsubscribe, e-mail: beginners-unsubscr...@perl.org For additional commands, e-mail: beginners-h...@perl.org http://learn.perl.org/