After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 522003 - Allocation of array on stack
Allocation of array on stack
Status: RESOLVED DUPLICATE of bug 492481
Product: vala
Classification: Core
Component: general
unspecified
Other All
: Normal enhancement
: ---
Assigned To: Jürg Billeter
Vala maintainers
Depends on:
Blocks:
 
 
Reported: 2008-03-12 13:02 UTC by Maciej (Matthew) Piechotka
Modified: 2008-03-15 00:46 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Maciej (Matthew) Piechotka 2008-03-12 13:02:59 UTC
Is it possible to do it or it would provide inconsistency in language?
I mean something like:
int[] my_ints = new int[1024] on stack;
->
int my_ints[1024];

or even (via calloc):
int[] my_ints = new int[my_function ()] on stack;
->
int my_ints_length = my_function ();
int *my_ints = (int *)alloca (my_ints_length);

It should improve the locality of code.
Comment 1 Jürg Billeter 2008-03-15 00:46:48 UTC
Thanks for the bug report. This particular bug has already been reported into our bug tracking system, but please feel free to report any further bugs you find.


*** This bug has been marked as a duplicate of 492481 ***