| View previous topic :: View next topic |
| Author |
Message |
KickinAezz
Joined: 03 Jun 2007 Posts: 328
|
Posted: Sat Jun 30, 2007 12:39 am Post subject: Mallocr.c _free_r problem,Really starting to bother me Alot. |
|
|
which point to
| Code: |
_free_r
../../../../../newlib/libc/stdlib/mallocr.c:2708
|
| Code: |
_free_r
../../../../../newlib/libc/stdlib/mallocr.c:3340
|
Changing Stack/heap sizes dint help...
There's 14050Kb of usable ram remaining....
The scenario: As I increase the number of statements in some function, EVEN BEFORE the control reaches that function, exception occurs....
Last edited by KickinAezz on Sat Jun 30, 2007 3:50 am; edited 2 times in total |
|
| Back to top |
|
 |
KickinAezz
Joined: 03 Jun 2007 Posts: 328
|
Posted: Sat Jun 30, 2007 2:07 am Post subject: |
|
|
Solved ATM,
sceKernelDcacheWritebackAll(); Did the trick... |
|
| Back to top |
|
 |
jimparis
Joined: 10 Jun 2005 Posts: 1179 Location: Boston
|
Posted: Sat Jun 30, 2007 2:31 am Post subject: |
|
|
| Crashes in malloc/free are almost always due to heap corruption. The cache writeback is probably just hiding your problem for now. |
|
| Back to top |
|
 |
KickinAezz
Joined: 03 Jun 2007 Posts: 328
|
Posted: Sat Jun 30, 2007 3:41 am Post subject: |
|
|
| jimparis wrote: | | Crashes in malloc/free are almost always due to heap corruption. The cache writeback is probably just hiding your problem for now. |
Is there any other solution for this?
Coz, this errors make me condense/reduce/limit the number of lines I put in a function... |
|
| Back to top |
|
 |
J.F.
Joined: 22 Feb 2004 Posts: 2906
|
Posted: Sat Jun 30, 2007 4:29 am Post subject: |
|
|
| The solution is to debug your code. The last time I helped someone find a bug, it was a string overflow (writing too many characters into a fixed size string). Bugs like that will cause all kinds of interesting problems. I'm not saying this is your problem, just giving an example of how one type of bug can lead to issues elsewhere. |
|
| Back to top |
|
 |
KickinAezz
Joined: 03 Jun 2007 Posts: 328
|
Posted: Sat Jun 30, 2007 7:24 am Post subject: |
|
|
| J.F. wrote: | | The solution is to debug your code. The last time I helped someone find a bug, it was a string overflow (writing too many characters into a fixed size string). Bugs like that will cause all kinds of interesting problems. I'm not saying this is your problem, just giving an example of how one type of bug can lead to issues elsewhere. |
Oh, someone! I'll do my best in debugging.
Is it recommended that I invalidate Instruction cache every loop?
sceKernelIcacheInvalidateall(); ???? |
|
| Back to top |
|
 |
Jim

Joined: 02 Jul 2005 Posts: 487 Location: Sydney
|
Posted: Sat Jun 30, 2007 11:44 am Post subject: |
|
|
No, you don't need to do it at all unless you are syncing with some other piece of hardware, such as the GU or ME.
Jim _________________ http://www.dbfinteractive.com |
|
| Back to top |
|
 |
|