To LUGNET HomepageTo LUGNET News HomepageTo LUGNET Guide Homepage
 Help on Searching
 
Post new message to lugnet.roboticsOpen lugnet.robotics in your NNTP NewsreaderTo LUGNET News Traffic PageSign In (Members)
 Robotics / 1970
  Re: legOS - Does it work for you?
 
(...) Hmmm ... not so sure if the task manager is responsible - I have a related (I think) problem if I use static variables - programs that work fine with global variables just lock solid when they are static. Since making them static merely moves (...) (25 years ago, 31-Dec-98, to lugnet.robotics)
 
  Re: legOS - Does it work for you?
 
(...) I tried that with the same results. At that point, I added some debug messages to the malloc and free routines. Using the demo light-sensor program I wrote down the addresses returned by malloc. There are only two calls per execi, the (...) (25 years ago, 31-Dec-98, to lugnet.robotics)
 
  Re: legOS - Does it work for you?
 
(...) Actually gcc and FreeBSD, but that shouldn't make any difference. Cheers, Ben. (25 years ago, 31-Dec-98, to lugnet.robotics)
 
  Re: legOS - Does it work for you?
 
(...) Ben you were right! I replace the malloc/free routines with a very simple array based allocation scheme and everything works great. I guess the other malloc I grabbed off the net wasn't any good either. Thanks! (25 years ago, 31-Dec-98, to lugnet.robotics)
 
  Re: legOS - Does it work for you?
 
(...) Not necessarily - it may be that the replacement happens to put things were some memory corruption doesn't hit them... Cheers, Ben. (25 years ago, 31-Dec-98, to lugnet.robotics)
 
  Re: legOS - Does it work for you?
 
(...) From previous embedded development efforts, the first thing to look at when weird things happen is stack overflow. In legOS, interrupt handlers run on the user threads' stack which makes it easier to overflow them. Since thread stacks are (...) (25 years ago, 31-Dec-98, to lugnet.robotics)
 
  Re: legOS - Does it work for you?
 
(...) You may still have a stack overflow issue, since if your malloc replacement doesn't maintain pointer chains you may not notice if memory gets trashed. John A. Tamplin Traveller Information Services jat@Traveller.COM 2104 West Ferry Way (...) (25 years ago, 31-Dec-98, to lugnet.robotics)
 
  RE: legOS - Does it work for you?
 
(...) Not sure if this is your problem, but most malloc implementations are not thread safe. Try putting your old malloc back with a lock around it and see if that improves it. -Allen -- Did you check the web site first?: (URL) (25 years ago, 31-Dec-98, to lugnet.robotics)
 
  Re: legOS - Does it work for you?
 
(...) I did make several changes to the malloc I found on the net. In the init fuction I created an mm_semaphore with sem_init. In both the malloc and the free functions I sandwiched the code between a sem_wait and sem_post call. This still had (...) (25 years ago, 31-Dec-98, to lugnet.robotics)

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