Re: [Vala] trying to allocate 4294967295 bytes
- From: Sebastian Spaeth <sebastian sspaeth de>
- Cc: vala-list gnome org
- Subject: Re: [Vala] trying to allocate 4294967295 bytes
- Date: Wed, 20 May 2009 20:57:29 +0200
Alberto Colombo wrote:
I would guess, it's because you're assigning a weak reference (returned
by data_get) to a strong one. When doing so, vala will make a copy of
the object referred by the weak ref, which in this case means to copy an
array of unknown length. Vala assigns -1 to data_length1 (to mean
"undefined"), but unfortunately that causes an array of length
4294967295 to be allocated...
You can probably solve the problem by using
weak uchar[] data;
instead of
uchar data;
in your code.
DOH, that was it. Thanks. I clearly still have a lot to learn about vala
variables.
spaetz
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]