[Date Prev][Date Next][Thread Prev][Thread Next] [Search] [Date Index] [Thread Index]

Re: [MacPerl] buffer size?



On 11/11/98 at 8:08 AM, online@mactech.com (Jeff at MacTech) wrote:

> >
> >The 450K limit on the amount of data returned to BBEdit from MacPerl
> >can be increased by increasing the memory allocation of BBEdit. I've
> >done tests where over 2 MB was returned to a BBEdit window from
> >MacPerl.
> >
> >It is certainly a bad thing that BBEdit crashes (or sometimes quits
> >with an out of memory alert) when the amount of text returned by
> >MacPerl is too large, but I have not found a way to deal with this
> >in the plug-ins. I think fixing this problem would require the
> >attention of Bare Bones Software.
> 
> I could be dead wrong here, but I think the problem may stem from the
> way AppleEvents functions. I believe that the AE Manager puts the
> response into the calling application's heap (in this case BBEdit)
> before the reply message is sent to the app, so that it doesn't have
> a chance to handle situations where the response is huge, because by
> the time it could check the size it is too late. But I'm not 100%
> sure of this. (But it's something I was thinking about recently.)

I think you're right. The crash occurs inside the AESend used to send the
Do Script Apple event to MacPerl. A simple solution to this problem would
be for MacPerl to write STDOUT and STDERR to temporary files that the
plug-in would access to display the results in BBEdit, rather than sending
STDOUT and STDERR in the reply Apple event.

Brad



***** Want to unsubscribe from this list?
***** Send mail with body "unsubscribe" to mac-perl-request@iis.ee.ethz.ch