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 / *2724 (-40)
  Re: detecting memory leaks
 
In case anyone attempts to use the mm_defrag() posted previously... you will need the following update to mm_try_join() //! check for free blocks after this one and join them if possible /* \param ptr pointer to size field of current block \return (...) (22 years ago, 13-Jul-02, to lugnet.robotics.rcx.legos)
 
  Re: detecting memory leaks
 
Jason, Excellent points! I like where this is going. "Jason Clark" wrote <snip> (...) See below. (...) then (...) Yes, it uses mm_try_join() --- here it is: //! defragment free blocks /*! use mm_try_join on each free block of memory */ void (...) (22 years ago, 12-Jul-02, to lugnet.robotics.rcx.legos)
 
  Re: detecting memory leaks
 
(...) Please, post. (...) I'm guessing you defrag using mm_try_join()? malloc() uses this to defrag the beginning of the pool until it finds a big enough block (which can then be split again if its too big); Defragging during idle would save this (...) (22 years ago, 12-Jul-02, to lugnet.robotics.rcx.legos)
 
  Re: anyone know how to check free space on RCX?
 
(...) Thanks for conducting the test... being 200+ miles away from my RCX this was bugging me :). My sources (gcc-2.95.2) have the same #define... but with the following about 120 lines earlier: /* Make int's 32 bits. */ #define TARGET_INT32 (...) (22 years ago, 12-Jul-02, to lugnet.robotics.rcx.legos)
 
  Re: anyone know how to check free space on RCX?
 
John A. Tamplin, Jason Clark, Jochen Hoenicke and Michael J Ash: Thank you all for addressing these issues! It all make sense after reading the preceeding messages. I appologize for causing confusion. I am glad, however, to get it straight. ??So (...) (22 years ago, 12-Jul-02, to lugnet.robotics.rcx.legos)
 
  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)
 
  Re: anyone know how to check free space on RCX?
 
(...) int is defined as the natural width of the processor, which on a 16-bit processor is 16 bits. longs are 64 bits on some machines as well, so you can't assume it is always 32 bits -- if your code cares, use sizeof. (...) 32-bit math on the H8 (...) (22 years ago, 12-Jul-02, to lugnet.robotics.rcx.legos)
 
  Re: anyone know how to check free space on RCX?
 
That is very interesting Jason. It is interesting that mm_free_mem() returns a 16bit value using a 32bit return code. Both int and long are 32bit value on most computers/compilers these days; short would be a 16bit value; and char would be an 8bit (...) (22 years ago, 11-Jul-02, to lugnet.robotics.rcx.legos)
 
  Re: anyone know how to check free space on RCX?
 
While the declaration for mm_free_mem is int mm_free_mem(void) The fact is that the RCX has only 32K of memory available. 32K in hex is 0x8000... there's never a need for more than 4 digits in hex. Looking at key_handler() in kernel/program.c (the (...) (22 years ago, 11-Jul-02, to lugnet.robotics.rcx.legos)
 
  Re: HOWTO Demo.c
 
Brilliant! Brilliant! It works! Many Thanks to Micheal Obenland and also to Steve Hassenplug Best Regards Shehryar "Michael Obenland" <obenland@t-online.de> wrote in message news:Gz1xAM.Inn@lugnet.com... (...) some (...) ---...--- (...) ---...--- (...) (22 years ago, 11-Jul-02, to lugnet.robotics.rcx.legos)
 
  Re: anyone know how to check free space on RCX?
 
Albert Huang, Sorry for the confusion. "most significant" = upper 16 bits and "least significant" = lower 16 bits (the free memory is a 32 bit value). If you write the values out, you will get the 32 bit value (both values are hex) ... for example: (...) (22 years ago, 11-Jul-02, to lugnet.robotics.rcx.legos)
 
  Re: anyone know how to check free space on RCX?
 
(...) v0.2.6) When you press the View button (with no program running) LegOS will (...) Joseph, what do you mean by most significant / least significant? I'm under the impression that those two calls just display the same value, in decimal first and (...) (22 years ago, 11-Jul-02, to lugnet.robotics.rcx.legos)
 
  RE: Re: Scheduler patch
 
Can someone please tell me how to unsubscribe from this group! Thanks, - Subir -----Original Message----- From: news-gateway@lugnet.com [mailto:news-gateway...net.com]On Behalf Of Ed Manlove Sent: Wednesday, July 10, 2002 8:49 PM To: (...) (22 years ago, 11-Jul-02, to lugnet.robotics.rcx.legos)
 
  Re: Re: Scheduler patch
 
Joseph, Not to add too much work load, if you have a chance could you give an overview of the proposals out there for the task scheduling and sensor modifications (if any). This could be simply a quick list of lugnet.robotics.rcx.legos threads which (...) (22 years ago, 11-Jul-02, to lugnet.robotics.rcx.legos)
 
  Re: HOWTO Demo.c
 
(...) Well, that's much easier than all the crap I was going through. I guess it helps if you actually know what you're talking about. Thanks Steve (22 years ago, 10-Jul-02, to lugnet.robotics.rcx.legos)
 
  Re: HOWTO Demo.c
 
To solve your problems with demo.c, you sent me your source. There are some problems with it, but I think they are intresting enough to say something about them. The big problem you get with your program is caused by your main function: ---...--- (...) (22 years ago, 10-Jul-02, to lugnet.robotics.rcx.legos)
 
  ***legOS new name : deadline is 18.07.***
 
As Steve mentioned, the 23.07. is too late for the announcement of the new name at Brickfest. I think it would be great to do so, so I decided to make the deadline at Thursday, 18.07. I will publish the new name around midnight of the 18.07 and (...) (22 years ago, 10-Jul-02, to lugnet.robotics.rcx.legos)
 
  lnp error message..huh?
 
woolley thnx for the tip on checking the RCX memory.. now i have another question.. after having run continous messages back and forth between the RCX and my program on my PC for ~10 minutes. i get this error message: ---...--- Transmit error: (...) (22 years ago, 10-Jul-02, to lugnet.robotics.rcx.legos)
 
  Re: Re: Scheduler patch
 
(...) I'd built a maze solver. When the solver makes a step (for example forward) it uses the light sensor to search for a wall and the rotation sensor to measure the distance it has traveled. If a wall is hit, the solver steps back until it reaches (...) (22 years ago, 10-Jul-02, to lugnet.robotics.rcx.legos)
 
  Re: Re: Scheduler patch
 
"Joel Uddén" wrote (...) not (...) Actually, each task gets equal "wakeup" checking. The only difference between a low priority task and a high priority task is that the high priority task gets a larger time-slice when it is awake. This is not an (...) (22 years ago, 10-Jul-02, to lugnet.robotics.rcx.legos)
 
  Re: Re: Scheduler patch
 
(...) Thanks for the link, your solution of proportional timeslicing is more straightforward than mine which I like. The only downside would be that a high prioritized process would have it's wakeup conditions checked less frequently than a low (...) (22 years ago, 10-Jul-02, to lugnet.robotics.rcx.legos)
 
  Re: anyone know how to check free space on RCX?
 
kenneth, I believe the code you are looking for is used in program.c (for LegOS v0.2.6) When you press the View button (with no program running) LegOS will show you "FREE", press again, you will get the most significant portion of the free memory (...) (22 years ago, 10-Jul-02, to lugnet.robotics.rcx.legos)
 
  Re: *** legOS new name - second ballot ***
 
Is there any way voting could be cut down to one week? It would be really nice to have a formal new name before Brickfest (July 19-21). Please send your vote, (...) (22 years ago, 9-Jul-02, to lugnet.robotics.rcx.legos)
 
  *** legOS new name - second ballot ***
 
Wow, the LEGOS group folks are fast! Both osmOS and brickOS are good for them, so I start the last and ultimate ballot. Please send your vote, either for brickOS or for osmOS, with the usual identification phrase, to legOS-namepoll@gmx.de The last (...) (22 years ago, 9-Jul-02, to lugnet.robotics.rcx.legos)  
 
  legOS new name - result and new problems
 
Hi out there, I know you are anxious to hear about the new name of legOS. Good news first: you don't have to flood my mail folder, here it goes... Here is the list of the names together with the phrases, if I got one. So everyone can see if his vote (...) (22 years ago, 9-Jul-02, to lugnet.robotics.rcx.legos)
 
  anyone know how to check free space on RCX?
 
hi all...after a while my RCX hangs and i think i might have a memory leak somewhere. anyone have, or know of, a function which i can use to check the available memory while my program is running ? regards kenneth johansen kennethj@stud.cs.uit.no (22 years ago, 9-Jul-02, to lugnet.robotics.rcx.legos)
 
  Re: HOWTO Demo.c
 
Can you tell which line it's locking up on? Try commenting out lines until it doesn't lock up (or until you run out of lines) ----- Original Message ----- From: "Shehryar Shaheen" <shehryar.shaheen@ul.ie> Date: Tue, 9 Jul 2002 15:42:56 GMT To: (...) (22 years ago, 9-Jul-02, to lugnet.robotics.rcx.legos)
 
  Re: HOWTO Demo.c
 
That is correct each Task started has a higher priority and they all have a higher prority than task_swapper like Prio Task 1 -- Task Swapper 2 -- Motor Driver Task 3 -- Light Sensor Task 4 -- Touch Sensor I changed the all the priorities to 1 but I (...) (22 years ago, 9-Jul-02, to lugnet.robotics.rcx.legos)
 
  Re: HOWTO Demo.c
 
If I understand this correctly (which I doubt) each task you start, has a higher priority, and they all have a higher priority than the 'task_swapper' task. Try setting all the priorities the same. Like to 1. See what that does. (...) (22 years ago, 9-Jul-02, to lugnet.robotics.rcx.legos)
 
  Re: HOWTO Demo.c
 
The code I have taken out of HOWTO.ps (URL) given at the end of the document under the name Demo.c I have fixed some compile time errors (like mismatching process ids in the kill call, the function for getting button state is dbutton() and not (...) (22 years ago, 9-Jul-02, to lugnet.robotics.rcx.legos)
 
  Re: HOWTO Demo.c
 
I'm no expert, but I can try to help you figure it out. Let's start with something simple. What version of LegOS are you using? How are you starting the 'task_swapper' task? What is in the 'motor_driver' task? At one time, when I was working with (...) (22 years ago, 9-Jul-02, to lugnet.robotics.rcx.legos)
 
  HOWTO Demo.c
 
Need Help, if someone has faced such a problem or knows the fix please do reply. In the legOS Howto their is a demo code demo.c which has some task switching examples I am having trouble with the following piece of code int task_swapper() { (...) (22 years ago, 9-Jul-02, to lugnet.robotics.rcx.legos)
 
  Re: [ANN] pbForth Version 2.1.5 Release and IR Data Tutorial
 
Hi Ralph, I don't know if you remember, but I had problems with SAVE-SYSTEM (see msg# 508)... until now! Just to let you know, with pbForth V2.1.5 and (more likely) GUI V2.1.3, it works fine! Thanks Mario (...) (22 years ago, 9-Jul-02, to lugnet.robotics.rcx, lugnet.robotics.rcx.pbforth, lugnet.robotics.rcx.legos)
 
  some lnp thoughts
 
hi all, im sitting here wondering if i should use lnp_addressing_write or lnp_integrity_write. The thing is that im writing a "sliding windows" protocol that might be used by other students here at the local university this autumn (as well as in my (...) (22 years ago, 8-Jul-02, to lugnet.robotics.rcx.legos)
 
  RE: [ANN] pbForth Version 2.1.5 Release and IR Data Tutorial
 
(...) Stupid cut and paste error on my part. It's fixed now... Cheers, Ralph (22 years ago, 8-Jul-02, to lugnet.robotics.rcx, lugnet.robotics.rcx.pbforth, lugnet.robotics.rcx.legos)
 
  Re: [ANN] pbForth Version 2.1.5 Release and IR Data Tutorial
 
Hi Ralph, I just tried the latest version and I can't setup the IR port (mine is USB). I get the following message: Error: can't read "portID": no such variable Works fine with the previous version. Thanks Mario (...) (22 years ago, 8-Jul-02, to lugnet.robotics.rcx, lugnet.robotics.rcx.pbforth, lugnet.robotics.rcx.legos)


Next Page:  5 more | 10 more | 20 more | 40 more

Redisplay Messages:  All | Compact

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