CCS C Software and Maintenance Offers
FAQFAQ   FAQForum Help   FAQOfficial CCS Support   SearchSearch  RegisterRegister 

ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

CCS does not monitor this forum on a regular basis.

Please do not post bug reports on this forum. Send them to support@ccsinfo.com

free() and code has no effect

 
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion
View previous topic :: View next topic  
Author Message
robert



Joined: 10 Aug 2006
Posts: 9

View user's profile Send private message

free() and code has no effect
PostPosted: Fri Mar 30, 2007 7:06 am     Reply with quote

I'm currently converting some VSC code to this compiler and i am getting
"code has no effect" when ever I compile a free() function. I even used the sample code in the manual and get the same result. Does anyone know if free() works and if there is a workaround.

uP
18f87J10

usage

free((void *)bpb->bpb1);

even this give an error

int *x;
x = malloc(10);
free(x);

Regards
Robert
PCM programmer



Joined: 06 Sep 2003
Posts: 21708

View user's profile Send private message

PostPosted: Fri Mar 30, 2007 2:11 pm     Reply with quote

I couldn't get the manual's example to work either, as written.
I gave up on it.

What happens if you compile the example file, Ex_Malloc.c ?
Make a project and use that file as the main source file.
Edit the file and change the #include file to 18F87J10.H.
It uses free() and it compiled OK for me with PCH vs. 3.249 and 4.030.
I don't know if it works, but it did compile.
Display posts from previous:   
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion All times are GMT - 6 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group