[Advcomparch] Problem with stack
Nikos Anastopoulos
anastop at cslab.ece.ntua.gr
Tue Jun 17 01:23:27 EEST 2008
Ypothetw oti sto programma sou orizeis tous pinakes mesa sth main,
me apotelesma aytoi na apothikeyontai sthn perioxh ths stoivas.
O sesc diamartyretai giati h stoiva pou xrhsimopoiei den einai arketa
megalh gia na xwrsei tous pinakes.
Genika, dinontas megales times gia to megethos ths stoivas
tha prepe na paizei, alla proteinw outws 'h allws
na akoulouthiseis kapoia apo tis exhs lyseis:
1) dokimase na oriseis tous pinakes exwterika ths main, wste na
apothikeytoun sto data area
2) xrhsimopoihse th malloc prokeimenou oi pinakes na ginoun allocate
dynamika sto heap.
Proswpika, proteinw to 2 san kalh taktikh (oxi mono gia thn askhsh, kai
genikotera). Thelei kapoia "prosoxh" sthn arxikopoihsh twn deiktwn (gia
osous den einai toso exoikeiwmenoi me thn C, yparxei edw ena sxetiko
paradeigma: http://prokutfaq.byethost15.com/MultiDimArray )
To 2 pisteyw oti tha doulepsei an kai den to xw dokimasei.
Panagiotis Vekris wrote:
> Καλησπέρα.
> Δοκίμασα να κάνω την προσομοίωση για τον πρώτο αλγόριθμο και ενώ το compile
> γίνεται σωστά, κατά την εκτέλεση της προσομοίωσης λαμβάνω το εξής μήνυμα:
>
> $ ../build/sesc.mem -c ../build/sesc.conf -11 -22 ./ask1
> static[0x45c990-0x100010ac] heap[0x10002000-0x18002000]
> stack[0x18002000-0x187fa000] -> [0x9f000000-0xb739d670]
> Start Skipping Initialization (multithreaded mode)...
> stack overflow at instruction 0x400290 sp v=0xb6ba5440 p=0x18001dd0 stack
> top=0x18002000
> Increase the stack size with the `-k' option.
>
>
> Προσπάθησα να αλλάξω την παράμετρο [-k stack_size] ,αλλά δεν είχα κάποιο
> αποτέλεσμα για τις τιμές που δοκίμασα.
> Υπάρχει καμιά ιδέα;
>
> ------------------------------------------------------------------------
>
> _______________________________________________
> Advcomparch mailing list
> Advcomparch at lists.cslab.ece.ntua.gr
> http://lists.cslab.ece.ntua.gr/mailman/listinfo/advcomparch
>
--
Nikos Anastopoulos, PhD Candidate
National Technical University of Athens (NTUA)
School of Electrical and Computer Engineering
Computing Systems Laboratory
e-mail: anastop at cslab.ece.ntua.gr
Tel: +30-210-7722279
More information about the Advcomparch
mailing list