To LUGNET HomepageTo LUGNET News HomepageTo LUGNET Guide Homepage
 Help on Searching
 
Post new message to lugnet.robotics.rcx.legosOpen lugnet.robotics.rcx.legos in your NNTP NewsreaderTo LUGNET News Traffic PageSign In (Members)
 Robotics / RCX / legOS / *2719 (-5)
  detecting memory leaks
 
In the thread "anyone know how to check free space on RCX?" the issue of checking for memory leaks was raised. I wanted to mention that I have some code that may help in that area. I wrote a function for the memory manager called mm_defrag() It (...) (22 years ago, 12-Jul-02, to lugnet.robotics.rcx.legos)
 
  Re: anyone know how to check free space on RCX?
 
(...) The header is ok, but int is 2 bytes = 16 bit. You can check this with this highly optimized program: #include <conio.h> int main(int argc, char *argv[]) { lcd_int( sizeof( int ) ); for(;;) ; return 0; } And in the kernel sources, mm.c says (...) (22 years ago, 12-Jul-02, to lugnet.robotics.rcx.legos)
 
  Re: anyone know how to check free space on RCX?
 
(...) This can't be right. I'm about 99% sure that all of the ints I've used with my legOS programs have been 2 bytes. When using LNP to send RCX ints to a PC, for example, you have to use short on the PC end of things to make it all work right. (...) (22 years ago, 12-Jul-02, to lugnet.robotics.rcx.legos)
 
  Re: anyone know how to check free space on RCX?
 
(...) My sources (gcc-3.0) say: #define INT_TYPE_SIZE (TARGET_INT32 ? 32 : 16) A short experiment revealed that sizeof(short)=sizeof(int)=2, sizeof(long)=4. So int is normally 16bit. Only with the switch "-mint32" I get 32 bit ints. This is with a (...) (22 years ago, 12-Jul-02, to lugnet.robotics.rcx.legos)
 
  Re: anyone know how to check free space on RCX?
 
(...) According to config/h8300/h8300.h in the gcc sources, int is 32bit for the h8 cross compiler. I believe the reason mm_free_mem() returns an int is because the memory manager stores the size of each free block as size_t, which is defined in (...) (22 years ago, 12-Jul-02, to lugnet.robotics.rcx.legos)


Next Page:  5 more | 10 more | 20 more

Redisplay Messages:  All | Compact

©2005 LUGNET. All rights reserved. - hosted by steinbruch.info GbR