Re: MemPtrFree

2007-02-08 Thread Sruthi
lue inside head with the value returned by the GetCharPtr() API, lets say it is 0x0200. when you do: MemPtrFree(head); you should be doing: MemPtrFree(0x0100); but, instead are doing: MemPtrFree(0x0200); and, 0x02000 is a pointer that wasn't allocated using M

Re: MemPtrFree

2007-02-08 Thread Aaron Ardiri
char *head; head = (char *) MemPtrNew(100); head = text->GetCharPtr(header); you allocate 100 bytes; lets say it has a memory location 0x0100. you then *replace* the value inside head with the value returned by the GetCharPtr() API, lets say it is 0x0200. when you do: MemPtrF

RE: MemPtrFree

2007-02-08 Thread Jagat Nibas Mahapatra
rum Subject: MemPtrFree Hi alll... I used a char poniter for holding a string. I have done this by first initializing the pointer memory with MemPtrNew. After the process i tried releasing the memory with MemPtrFree. After reaching the MemPtrFree point the application breaks with an er

MemPtrFree

2007-02-08 Thread Sruthi
Hi alll... I used a char poniter for holding a string. I have done this by first initializing the pointer memory with MemPtrNew. After the process i tried releasing the memory with MemPtrFree. After reaching the MemPtrFree point the application breaks with an error "MemoryMgr.c,

Re: MemPtrFree

2005-10-09 Thread Ben Combee
C allows casting from void * to other pointer types without an explicit cast. C++ requires the cast to compile. -Original Message- From: Logan Shaw <[EMAIL PROTECTED]> Subj: Re: MemPtrFree Date: Mon Oct 10, 2005 1:14 am Size: 1K To: "Palm Developer Forum" JAME

Re: MemPtrFree

2005-10-09 Thread Logan Shaw
JAMES S HAINES wrote: For some reason PODS 1.2 indicates an error via a red square in the upper right hand corner of the editor whenever I try to release an unmovable chunk of memory by MemPtrFree(p). Perhaps I'm using it incorrectly or perhaps a bug in PODS?? I have included a function

MemPtrFree

2005-10-09 Thread JAMES S HAINES
For some reason PODS 1.2 indicates an error via a red square in the upper right hand corner of the editor whenever I try to release an unmovable chunk of memory by MemPtrFree(p). Perhaps I'm using it incorrectly or perhaps a bug in PODS?? I have included a function below as an example of

Re: MemGluePtrNew : Can I use MemPtrFree to release it?

2004-05-22 Thread \[ a | x \] - Peter Alex
Hello, I don't mean 'not trust with MemPtrFree'. So far error i got had relation to memory leaks. However, it is fine now. It was solved. Thanks expert(s) for all your help/suggestion. regards, Peter Alex --- Ben Combee <[EMAIL PROTECTED]> wrote: > At 01:42 AM 5/2

Re: MemGluePtrNew : Can I use MemPtrFree to release it?

2004-05-21 Thread Ben Combee
At 01:42 AM 5/21/2004, you wrote: Hi experts, 1. can i use 'MemPtrFree' to free-up memory claimed with 'MemGluePtrNew'? Yes, MemPtrFree is the appropriate API to use to free that memory. 2. Please advice how to 'really' free-up memory claimed by 'MemGluePtrNew&#

Re: MemGluePtrNew : Can I use MemPtrFree to release it?

2004-05-21 Thread Aaron Ardiri
> 1. can i use 'MemPtrFree' to free-up memory claimed >with 'MemGluePtrNew'? yes. > 2. Please advice how to 'really' free-up memory >claimed by 'MemGluePtrNew'/'MemPtrNew' so any variable >created with those methods a

MemGluePtrNew : Can I use MemPtrFree to release it?

2004-05-20 Thread \[ a | x \] - Peter Alex
Hi experts, 1. can i use 'MemPtrFree' to free-up memory claimed with 'MemGluePtrNew'? 2. Please advice how to 'really' free-up memory claimed by 'MemGluePtrNew'/'MemPtrNew' so any variable created wit

Re: MemPtrFree not freeing string pointer

2004-05-17 Thread Ben Combee
fine. But calling MemPtrFree does not actually free the memory. Here's the code I'm using minus code that actually does the drawing and manipulating the data. char *string1; // string pointer def. string1 = MemPtrNew(sizeof(char) * 7); // allocating string pointer me

MemPtrFree not freeing string pointer

2004-05-17 Thread Jonathan Mason
What I'm trying to do is have a gadget display a number which I store in a TimeType variable as the gadget's data, then on drawing I take the numbers out of the TimeType variable and convert them to a string using StrIToA everything seems to work fine. But calling MemPtrFree does not

RE: MemPtrNew / MemPtrFree question

2004-04-23 Thread Hays, Jonathan \(GE Infrastructure\)
Sent: Friday, April 23, 2004 3:55 AM To: Palm Developer Forum Subject: Re: MemPtrNew / MemPtrFree question Hi, does this also apply the the same way to MemHandles? Thanks Peter "Hays, Jonathan (GE Infrastructure)" <[EMAIL PROTECTED]> schrieb im Newsbeitrag news:[EMAIL PROTECTED] You

Re: MemPtrNew / MemPtrFree question

2004-04-23 Thread Dave Lippincott
: Friday, April 23, 2004 6:54 AM Subject: Re: MemPtrNew / MemPtrFree question > Hi, > does this also apply the the same way to MemHandles? > > Thanks > Peter > > "Hays, Jonathan (GE Infrastructure)" <[EMAIL PROTECTED]> schrieb im > Newsbeitrag news:[EMAIL PRO

Re: MemPtrNew / MemPtrFree question

2004-04-23 Thread Pit
er Forum Subject: MemPtrNew / MemPtrFree question Hi, i m using MemPtrNew like in the following pseudo code: char** temp; temp = MemPtrNew (size * sizeof (char*)) for ( int i = 0; i < size; i++) { temp[i] = MemPtrNew (10); } Do i have to free it like the same way, or is a call of MemPtrFree(te

RE: MemPtrNew / MemPtrFree question

2004-04-22 Thread Hays, Jonathan \(GE Infrastructure\)
PROTECTED] [mailto:[EMAIL PROTECTED] Behalf Of Pit Sent: Thursday, April 22, 2004 1:32 PM To: Palm Developer Forum Subject: MemPtrNew / MemPtrFree question Hi, i m using MemPtrNew like in the following pseudo code: char** temp; temp = MemPtrNew (size * sizeof (char*)) for ( int i = 0; i < size

MemPtrNew / MemPtrFree question

2004-04-22 Thread Pit
Hi, i m using MemPtrNew like in the following pseudo code: char** temp; temp = MemPtrNew (size * sizeof (char*)) for ( int i = 0; i < size; i++) { temp[i] = MemPtrNew (10); } Do i have to free it like the same way, or is a call of MemPtrFree(temp) enough? So does MemPtrFree(temp), also f

Re: MemPtrNew / MemPtrFree

2004-02-17 Thread Flex
put this somewhere out of the function (make it global) and declare it as external to have acces to it from everywhere: ContextType *context; Then in you AppStart function add this: context=(ContextType *)MemPtrNew(sizeof(ContextType)); in AppStop add: MemPtrFree(context); George wrote: Hello

Re: MemPtrNew / MemPtrFree

2004-02-17 Thread Ryan Andersen
non-movable memory, I believe you can do it like so: UInt32 *myVar myVar = (*UInt32) MemPtrNew(sizeof(UInt32));// allocates a UInt32 on the dynamic heap *myVar = 1;// set its value //free the memory MemPtrFree(myVar); // note, because this is non moval memory, you should not keep it

MemPtrNew / MemPtrFree

2004-02-17 Thread George
ious thread. So, I've decided I should take a serious look at using "MemPtrNew" and "MemPtrFree" to make the application more efficient. However, I don't know how to use them. This is the existing code in my Pilot Main: UInt32 PilotMain(UInt16 cmd, MemPtr cmdPB

Re: MemPtrFree problem

2004-02-16 Thread Robert Scott
On Mon, 16 Feb 2004 10:01:52 +0100, "christer" <[EMAIL PROTECTED]> wrote: >I have two global variables: > >Char *downloadX; >Char *downloadY; > >In StartApplication() I do: > >downloadX = (Char*)MemPtrNew(1024); >downloadY = (Char*)MemPtrNew(1024); >

Re: MemPtrFree problem

2004-02-16 Thread christer
; > downloadX = (Char*)MemPtrNew(1024); > downloadY = (Char*)MemPtrNew(1024); > > And i StopApplication() I do: > > MemPtrFree(downloadX); > MemPtrFree(downloadY); > > POSE gives me a "bus error" because of the MemPtrFree() calls in > StopApplication(). If

MemPtrFree problem

2004-02-16 Thread christer
I have two global variables: Char *downloadX; Char *downloadY; In StartApplication() I do: downloadX = (Char*)MemPtrNew(1024); downloadY = (Char*)MemPtrNew(1024); And i StopApplication() I do: MemPtrFree(downloadX); MemPtrFree(downloadY); POSE gives me a "bus error" because of the

RE: MemPtrFree - invalid chunk

2003-06-25 Thread Agus Silas
Yeap, you're right... Thanks Chris Agus -Message d'origine- De : [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] la part de Chris Tutty Envoyé : mercredi 25 juin 2003 01:22 À : Palm Developer Forum Objet : Re: MemPtrFree - invalid chunk From: "Agus Silas" <[EMAI

Re: MemPtrFree - invalid chunk

2003-06-24 Thread Chris Tutty
From: "Agus Silas" <[EMAIL PROTECTED]> > In fact, I've moved the free session from the end of the AppEventLoop to > AppStop. I thougt that I "cut" then "paste", but instead I "copy" then > "paste", so I freed twice. > A good way to avoid this error, or at least prevent it causing problems is to s

RE: MemPtrFree - invalid chunk

2003-06-24 Thread Agus Silas
Stupid me Agus -Message d'origine- De : [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] la part de Aaron Ardiri Envoyé : mardi 24 juin 2003 13:36 À : Palm Developer Forum Objet : Re: MemPtrFree - invalid chunk > do you have the pb in Debug and in Release mode? > Perhaps

Re: MemPtrFree - invalid chunk

2003-06-24 Thread Aaron Ardiri
> do you have the pb in Debug and in Release mode? > Perhaps you should resize up the stack (in project setting > in CodeWarrior) i dont see how making the stack larger will help him in this case. :) he uses a global variable to store the pointer. and, he is not allocating too much for it to cra

Re: MemPtrFree - invalid chunk

2003-06-24 Thread Aaron Ardiri
> When I quit my application, I got an error "Invalid Chunk ptr". > It seems that I do not free the memory allocated correctly, but > I don't see what is wrong in my code ??? the memory code looks fine - that should not be causing your error to occur - most likely it is somewhere else in your c

RE: MemPtrFree - invalid chunk

2003-06-24 Thread Agus Silas
: Re: MemPtrFree - invalid chunk do you have the pb in Debug and in Release mode? Perhaps you should resize up the stack (in project setting in CodeWarrior) - Original Message - From: "Agus" <[EMAIL PROTECTED]> Newsgroups: palm-dev-forum To: "Palm Developer Forum" &l

Re: MemPtrFree - invalid chunk

2003-06-24 Thread Rodolphe Bréjaude
nt: Tuesday, June 24, 2003 12:24 PM Subject: MemPtrFree - invalid chunk > Hi all, > > Here's my code looks like : > > > // global > char**gsListBuffer; > > static void AppEventLoop(void) > { > int i; > > gsListBuffer = (char **) MemPtrNew

MemPtrFree - invalid chunk

2003-06-24 Thread Agus
} while (); } static void AppStop(void) { int i; // free listbox buffer for ( i = 0; i < 8; i++ ) MemPtrFree ( (char *)gsListBuffer[i] ); MemPtrFree ( (char **) gsListBuffer ); } When I quit my application, I got an error "Invalid Chunk ptr". It seems t

Re: Still getting MemPtrFree errors !

2002-11-20 Thread Dave Lippincott
Sorry to say this but an exception on MemPtrFree is almost always the program's fault. Try checking the pointer to see if its valid before calling MemPtrFree. Make sure you didn't over-bound the variable, i.e. allocate 10 bytes and stuff 11 chars into it. Also try posting some of

RE: Still getting MemPtrFree errors !

2002-11-19 Thread Danny Wong
HI, Make sure the original pointer is not changed. Some code would help! Regards, Danny www.toysoft.ca -Original Message- From: Chris Massey [mailto:[EMAIL PROTECTED]] Sent: November 19, 2002 3:44 PM To: Palm Developer Forum Subject: Still getting MemPtrFree errors ! HI again

Still getting MemPtrFree errors !

2002-11-19 Thread Chris Massey
HI again... Tried everything I canI allocate space using MemPtrNew, free it using MemPtrFree. I get an exception on MemPtrFree, or memory leaks if I don't. Any clues ? anybody else had this ? Chris -- For information on using the Palm Developer Forums, or to unsubscribe, pleas

Re: MemPtrFree causes exception

2002-11-15 Thread Brad Figler
I stand corrected. The warning/error message that I was thinking about was freeing a freed handle (i.e. the error message is Free handle). I apologize about that. I should make sure I don't have my wires crossed before posting (obviously)! Brad "Keith Rollin" <[EMAIL PROTECTED]> wrote in messa

Re: MemPtrFree causes exception

2002-11-15 Thread Brad Figler
I will double check my statement! You would probably know better than I. I will try to re-create the error message and will let you know! Brad "Keith Rollin" <[EMAIL PROTECTED]> wrote in message news:101282@palm-dev-forum... > > At 5:35 PM -0700 11/15/02, Brad Figler wrote: > >The simulator will

Re: MemPtrFree causes exception

2002-11-15 Thread Keith Rollin
At 5:35 PM -0700 11/15/02, Brad Figler wrote: The simulator will, however, tell you that you are freeing a locked chunk. Are you sure about that? I can't find anything in the sources that checks for that when freeing a handle. What message does it give you? Perhaps I could search on that.

Re: MemPtrFree causes exception

2002-11-15 Thread Brad Figler
Freeing unlocked memory is OK. There is no need to unlock a locked block first. It should not cause the crash Chris Massey is reporting. -- Keith -Original Message- From: Bill Andreozzi [mailto:billandr@;statuspro.tv] Sent: Friday, November 15, 2002 3:29 PM To: Palm Developer Forum Subject

RE: MemPtrFree causes exception

2002-11-15 Thread Keith Rollin
Subject: Re: MemPtrFree causes exception Chris is right, you more than likely may have been trying to free memory that you have not unlocked first, try calling unlock, then free. thanks - bill "Chris Massey" <[EMAIL PROTECTED]> wrote in message news:101110@;palm-dev-forum... > >

Re: MemPtrFree causes exception

2002-11-15 Thread Bill Andreozzi
my app on the emulator. When I call > MemPtrFree to free the ptrs allocated with MemPtrNew I get a big fat error. > But without it I get leaks !! What the is going on ? Help !! > > Chris > > > > -- For information on using the Palm Developer Forums, or to unsu

Re: MemPtrFree causes exception

2002-11-14 Thread Chris Tutty
From: "Chris Massey" <[EMAIL PROTECTED]> > So I get memory leaks when exiting my app on the emulator. When I call > MemPtrFree to free the ptrs allocated with MemPtrNew I get a big fat error. > But without it I get leaks !! What the is going on ? Help !! > Off

MemPtrFree causes exception

2002-11-14 Thread Chris Massey
So I get memory leaks when exiting my app on the emulator. When I call MemPtrFree to free the ptrs allocated with MemPtrNew I get a big fat error. But without it I get leaks !! What the is going on ? Help !! Chris -- For information on using the Palm Developer Forums, or to

Re: MemPtrFree error

2000-07-14 Thread Walter Black
Thank you to all who replied to my question. Your tips have solved my problem. Walter Black BuildNet, Inc Software Engineer [EMAIL PROTECTED] 919-941-4752 -- For information on using the Palm Developer Forums, or to unsubscribe, please see http://www.palmos.com/dev/tech/support/forums/

Re: MemPtrFree error

2000-07-13 Thread Ben Combee
"Walter Black" <[EMAIL PROTECTED]> wrote in message news:17293@palm-dev-forum... > > Hello All, > I'm attempting to use the following code but I get an error when I free the > memory. What am I doing wrong? > > CharPtr typeP; > ListPtr listP; > typeP = MemPtrNew(10); > listP = GetObjectPtr(Detai

Re: MemPtrFree error

2000-07-13 Thread Peter Epstein
Looks to me like you're trying to free memory that you didn't allocate. Probably the memory manager is complaining because it can't find the chunk header, which would happen if the memory in question is just part of a larger chunk, such as the chunk allocated by Palm OS for the form. -- Peter E

MemPtrFree error

2000-07-13 Thread Walter Black
listP, LstGetSelection(listP)); ... /*do something with typeP*/ MemPtrFree(typeP); The error does not have any text when using CW6. Any help would be appreciated. Thanks Walter Black BuildNet, Inc Software Engineer [EMAIL PROTECTED] 919-941-4752 -- For information on using the