[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Gnash-dev] Re: Not enough storage was allocated to hold the appended da
From: |
Rob Savoye |
Subject: |
[Gnash-dev] Re: Not enough storage was allocated to hold the appended data! |
Date: |
Tue, 18 Nov 2008 14:21:32 -0700 |
User-agent: |
Thunderbird 2.0.0.16 (X11/20080723) |
strk wrote:
> I've naively fixed the previous problem by avoiding the
> stack allocation of Elemtn.
> Now, next problem is amf::Buffer throwing this exception:
>
> Not enough storage was allocated to hold the appended data!
That's no a problem, that's what it's supposed to do. :-)
>>From the code I understand amf::Buffer::append does NOT
> do reallocation. Is caller responsible for reallocations
> then ? Which Buffer method should caller use to reallocate ?
Buffer::resize() of course, which does the additional step of copying
the data to the newly resized buffer. Yes, buffers are ::init()'d to a
size, and only ::resize() does any more memory allocations. This is on
purpose.
- rob -