#33 Xinitscr(""); using XCurses 2.6 causes massive memory leak

closed-invalid
None
5
2005-12-31
2003-10-08
Anonymous
No

I haven't had time to debug the problem but calling
Xinitscr(""); on Irix 6.5.21 (Compiled w/MIPSpro 7.4
Compilers); Generates a never-ending loop (guess since
I didn't debug it yet) which starts allocating massive
amounts of ram (upto 1GB in less than 1min). and the
program does not run.

int
main(void)
{
int i;

Xinitscr("");
start_color();
i = has_colors();
printw("has_colors = %d", i);
i = init_pair(1, 5, 0);
printw("init pair = %d", i);
i = attrset(COLOR_PAIR(1));
printw("attrset = %d", i);
i = curs_set(0);
printw("curset = %d", i);
addstr("Hello World\n");
refresh();
sleep(100);
XCursesExit();
}

Will reproduce the problem

leroy@ansic.net
LeRoy.

Discussion

  • Mark Hessling

    Mark Hessling - 2003-12-26
    • assigned_to: nobody --> rexx
    • summary: Xinitscr(""); using XCurses 2.6 cuases massive memory leak --> Xinitscr(""); using XCurses 2.6 cuases massive memory leak
     
  • William McBrine

    William McBrine - 2005-12-09

    Logged In: YES
    user_id=27933

    For me, your test program crashes on startup. But that's
    because Xinitscr() doesn't take a string as a parameter.
    Rather, it's Xinitscr(int, char **) -- specifically, it
    would like to be passed argc and argv.

    If I change that line to initscr(), or if I change the
    prototype of main() and pass argc and argv to Xinitscr(),
    the program works fine on my system. I don't have an IRIX
    system to test on, though.

    Barring any additional info, I'm closing this.

     
  • William McBrine

    William McBrine - 2005-12-09
    • assigned_to: rexx --> wmcbrine
    • summary: Xinitscr(""); using XCurses 2.6 cuases massive memory leak --> Xinitscr(""); using XCurses 2.6 causes massive memory leak
    • status: open --> pending-invalid
     
  • William McBrine

    William McBrine - 2005-12-31
    • status: pending-invalid --> closed-invalid