Ignore:
Timestamp:
10/13/08 03:18:56 (5 years ago)
Author:
sam
Message:

libpipi: get rid of all remaining large stack allocations.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • libpipi/trunk/pipi/codec/oric.c

    r2941 r2942  
    525525static void write_screen(float const *data, uint8_t *screen) 
    526526{ 
    527     int src[(WIDTH + 1) * (HEIGHT + 1) * 3]; 
    528     int dst[(WIDTH + 1) * (HEIGHT + 1) * 3]; 
    529     int *srcl, *dstl; 
     527    int *src, *srcl, *dst, *dstl; 
    530528    int stride, x, y, depth, c; 
    531529 
    532530    stride = (WIDTH + 1) * 3; 
    533531 
    534     memset(src, 0, sizeof(src)); 
    535     memset(dst, 0, sizeof(dst)); 
     532    src = malloc((WIDTH + 1) * (HEIGHT + 1) * 3); 
     533    memset(src, 0, (WIDTH + 1) * (HEIGHT + 1) * 3); 
     534 
     535    dst = malloc((WIDTH + 1) * (HEIGHT + 1) * 3); 
     536    memset(dst, 0, (WIDTH + 1) * (HEIGHT + 1) * 3); 
    536537 
    537538    /* Import pixels into our custom format */ 
Note: See TracChangeset for help on using the changeset viewer.