MrFusion
Apr 24, 07:21 AM
I recently realized the existence of void pointers. These are quite useful if the primitive type for a data storage class is not known. Though, I have a question as to whether I am using them correctly.
My storage class will allocate memory and keep track of the byte size of the individual pieces. The user then set and extract bytes via void * pointers.
The storage class then copies bytes to and from the storage memory as needed. Basically my own crude implementation of NSMutableArray/NSMutableData.
The user gets back a void * pointer and then casts this into whatever is needed. Yes, probably too much responsibility is given to the user.
Anyway, I am concerned about memory leaks. To return a value, I memcpy() the bytes into a newly created memory malloc(). But there is no corresponding free().
The user has to free the memory. But calling free after casting and dereferencing causes a crash. Does memory have to be freed in this case? See last for loop.
Thanks for reading, replying and hopefully a lesson in pointers.
int main (int argc, const char * argv[]) {
St Tropez Jewels - Sterling Silver Plated and Pave Link Bracelet | St Tropez Jewels
Chain-Link Pavé Bracelet
John Medeiros - Oval Link Pave
more...
style Curb link bracelet
One Pave Link Bracelets
more...
3-link bracelet 22.5MM
white pave link bracelet
more...
Borgo and his Fall 2011
Diamond pave link
more...
Stunning 6 Pave Figaro Link ID
St Tropez Jewels - Sterling Silver Plated and Pave Link Bracelet | St Tropez Jewels
more...
White Summer Link Bracelet
Sterling Silver Link Pave
more...
Pave curb link bracelet
Domed, solid link bracelet in
more...
White Summer Link Bracelet
Mixed pave cable link bracelet
Mixed pave cable link bracelet
My storage class will allocate memory and keep track of the byte size of the individual pieces. The user then set and extract bytes via void * pointers.
The storage class then copies bytes to and from the storage memory as needed. Basically my own crude implementation of NSMutableArray/NSMutableData.
The user gets back a void * pointer and then casts this into whatever is needed. Yes, probably too much responsibility is given to the user.
Anyway, I am concerned about memory leaks. To return a value, I memcpy() the bytes into a newly created memory malloc(). But there is no corresponding free().
The user has to free the memory. But calling free after casting and dereferencing causes a crash. Does memory have to be freed in this case? See last for loop.
Thanks for reading, replying and hopefully a lesson in pointers.
int main (int argc, const char * argv[]) {
FubsyGamr
Oct 17, 04:03 PM
Thanks for the post. I am really interested in a leather case with a front cover.
The site says "preorder." But you have already received the case. So those cases on the site are actually in stock?
Well, when I ordered it, the website did not say "preorder" it just gave the option to order. So I'm not sure if maybe they've since run out of cases? I'm not 100% sure about that.
But yes, I received my case about a week and a half ago.
The site says "preorder." But you have already received the case. So those cases on the site are actually in stock?
Well, when I ordered it, the website did not say "preorder" it just gave the option to order. So I'm not sure if maybe they've since run out of cases? I'm not 100% sure about that.
But yes, I received my case about a week and a half ago.
eyelikeart
Jul 7, 09:16 AM
yeah...I've been around for 2.5 years this month... :D
time flies, eh?
so jef...what are u going to do for your 3rd anniversary? ;)
time flies, eh?
so jef...what are u going to do for your 3rd anniversary? ;)
bingles
Mar 25, 03:57 AM
I thinking that I'll be able to get there between 2 and 2.30pm... What do we reckon, too late or not?
more...
ryannel2003
Jan 15, 09:29 PM
I had signed up a couple of days ago, and low and behold: I didn't receive a e-mail either. Oh well, I couldn't contain my excitement and went to the Apple website anyway! :D
gnasher729
Mar 29, 03:40 PM
gnasher said to print out the call which I had done previous. There are no typos. But in fact I do have the same problem running it from the command line. Where does the & go?
You have a loop. The "system" command is executed each time in the loop. So when you enter "Q" to exit the loop, all the commands are executed again. That's what the printf should have shown you.
So what happens when you execute the second system () call? I don't expect it to work. I expect it to overwrite the output of the first system () command.
You have a loop. The "system" command is executed each time in the loop. So when you enter "Q" to exit the loop, all the commands are executed again. That's what the printf should have shown you.
So what happens when you execute the second system () call? I don't expect it to work. I expect it to overwrite the output of the first system () command.
more...
TT4T
Apr 6, 11:45 PM
American Eagle, I would be naked without them.
McDonalds, simply for the Mocha Frappe.
Old Spice Deodorant, to attract females...
McDonalds, simply for the Mocha Frappe.
Old Spice Deodorant, to attract females...
frunkis54
Jul 2, 11:57 PM
seriously no ipad update yet. that should have been released before retina update.
more...
lambchucks40
Jan 28, 04:08 PM
Can you clarify step #8 please.
TheOne
Jul 12, 12:01 AM
I have been a PC user for basicly my entire life, but I have never exactly been happy with it. The thing would crash, have the BSoD, but that is not really why i switched.
Basicly I got tired of the Windows Operating System, Bill Gates, and the millions of PC Viruses. I needed a notebook for college in the fall, and I picked up a 17" PowerBook G4 because it suites all of my needs and it replaces the need for a desktop for quite some time. I have enjoyedm first week as a Mac User because everything has worked so well, and I am actually used to all of the windows opened at the same time now! (I never understood before untill I actually spent hours upon hours with the thing)
I have now become addicted to iTunes and have puchased 68 songs in my first week. :D Another reason why I wanted the Mac is because of Final Cut Pro. I love watching and making movies so I felt that the Mac would be the best thing for me... The last movie I made was on my Pentium 4 box and I nearly threw it out of the window because it was so evil... Hopefully the Mac is more kind. I have not started to edit video on my Mac yet, but that is because I have not had the time.
I like my "little" 17" PowerBook because it works great and everyone I have shown it off to has been really amazed by it. :cool:
Basicly I got tired of the Windows Operating System, Bill Gates, and the millions of PC Viruses. I needed a notebook for college in the fall, and I picked up a 17" PowerBook G4 because it suites all of my needs and it replaces the need for a desktop for quite some time. I have enjoyedm first week as a Mac User because everything has worked so well, and I am actually used to all of the windows opened at the same time now! (I never understood before untill I actually spent hours upon hours with the thing)
I have now become addicted to iTunes and have puchased 68 songs in my first week. :D Another reason why I wanted the Mac is because of Final Cut Pro. I love watching and making movies so I felt that the Mac would be the best thing for me... The last movie I made was on my Pentium 4 box and I nearly threw it out of the window because it was so evil... Hopefully the Mac is more kind. I have not started to edit video on my Mac yet, but that is because I have not had the time.
I like my "little" 17" PowerBook because it works great and everyone I have shown it off to has been really amazed by it. :cool:
more...
dongmin
Feb 9, 01:00 PM
Very cool.
Some additions I'd like to see (maybe for a 'pro' version):
Processor: bus speed
Memory: how many open slots
HD: speed of HD
Optical: speed of Superdrive
Display: external monitor spanning vs. mirroring
Price: US$ as well
Ports: PowerBooks have a PC card slot; also maybe a separate category for audio
Notes: maybe make a separate box for "Last Updated"
Some additions I'd like to see (maybe for a 'pro' version):
Processor: bus speed
Memory: how many open slots
HD: speed of HD
Optical: speed of Superdrive
Display: external monitor spanning vs. mirroring
Price: US$ as well
Ports: PowerBooks have a PC card slot; also maybe a separate category for audio
Notes: maybe make a separate box for "Last Updated"
Newbe
Apr 24, 11:48 AM
I bought my iMac in 2008 and I did not upgraded to Leopard or Snow Leopard. Lion will be released soon. Can I wait until Lion is released and then upgrade to Lion or will I be required to upgrade to Leopard prior to upgrading to Lion:confused?:?
more...
Mord
Oct 30, 05:59 AM
i half switched but still
when i was 7 we had a pb 100 with a stylewriter very cool but the power books mother board fryed when some one (not mentioning any names) puged an adb mouse in when it was turned on!!!
when i was about 11 we needed a computer so we went out and got a pc mag about 2 weeks later we were set to get a pile of crap from gateway then my dad saw a mac mag with an imac on the front so he called apple and got pissed of about there phone information as the guy on the line was compleatly incompadent and took it out on computers in genral so delayed our purchace a few months.......
a few months later he saw a cube a few months later...
2000 odd pounds of savings= a power mac g4 cube+15" apple studio display + epson 880 and a beta copy of osx.
2 weeks later one 12 year old mac expert
(i mean expert I fixed my freinds macs for them and made a tidy prophet too)
I also got my own ibook 12" 600 cd at the age of 14 (I got it for school as my hand writing is awfull (not to mention my spelling)
my school is macaphobic
the head of iT "dont plug your ibook into the network it could make our server crash"!
now my school has ordered 10 imacs and 2 pm g5's.
when i was 7 we had a pb 100 with a stylewriter very cool but the power books mother board fryed when some one (not mentioning any names) puged an adb mouse in when it was turned on!!!
when i was about 11 we needed a computer so we went out and got a pc mag about 2 weeks later we were set to get a pile of crap from gateway then my dad saw a mac mag with an imac on the front so he called apple and got pissed of about there phone information as the guy on the line was compleatly incompadent and took it out on computers in genral so delayed our purchace a few months.......
a few months later he saw a cube a few months later...
2000 odd pounds of savings= a power mac g4 cube+15" apple studio display + epson 880 and a beta copy of osx.
2 weeks later one 12 year old mac expert
(i mean expert I fixed my freinds macs for them and made a tidy prophet too)
I also got my own ibook 12" 600 cd at the age of 14 (I got it for school as my hand writing is awfull (not to mention my spelling)
my school is macaphobic
the head of iT "dont plug your ibook into the network it could make our server crash"!
now my school has ordered 10 imacs and 2 pm g5's.
Fishrrman
Apr 29, 09:18 AM
To go along with what others have posted...
You should definitely try to upgrade to either 10.3 or 10.4.
You'll find OS 10.1.x _very_ limiting, insofar as browsing is concerned, because the browsers and other software are too antiquated to handle much of what you'll encounter on the web today.
You should look for a 10.4 "universal" install DVD. Or, at the very least, OS 10.3.
Then, once you get the basic install completed, go to Apple's site and download the "combo" updater, which will get you to 10.4.11 (or to 10.3.9). Then use software update to apply whatever other updates are available.
IMPORTANT -- you _do_ have a drive in the older iMac that can read DVD's, is that correct?
You should definitely try to upgrade to either 10.3 or 10.4.
You'll find OS 10.1.x _very_ limiting, insofar as browsing is concerned, because the browsers and other software are too antiquated to handle much of what you'll encounter on the web today.
You should look for a 10.4 "universal" install DVD. Or, at the very least, OS 10.3.
Then, once you get the basic install completed, go to Apple's site and download the "combo" updater, which will get you to 10.4.11 (or to 10.3.9). Then use software update to apply whatever other updates are available.
IMPORTANT -- you _do_ have a drive in the older iMac that can read DVD's, is that correct?
more...
twoodcc
Mar 17, 06:14 PM
yeah something doesn't sound right here. can you tell us exactly what flags you used when starting folding?
are you using the console client?
are you using the console client?
maflynn
Feb 2, 09:53 AM
Yeh but ...... "every other sandy bridge computer is a 'PC' and Dell/HP appear to have more stock (sandy bridge) or in the process of ramping up production, when the news broke.
Yep and they'll have to right off that stock and/or get intel to cover the cost. The point is that this affects every computer maker. I'd not really single out one or two makers. What about Lenovo, they have sandy bridge computers, or Acer, Asus, or Gateway?
Yep and they'll have to right off that stock and/or get intel to cover the cost. The point is that this affects every computer maker. I'd not really single out one or two makers. What about Lenovo, they have sandy bridge computers, or Acer, Asus, or Gateway?
more...
iAmYou
May 1, 09:30 PM
Oops, must have hit a nerve :)
No not really.
Just don't like trolls.
No not really.
Just don't like trolls.
cambookpro
May 6, 06:31 PM
I find shut down times amazingly fast now. Takes about 4 secs to shut down, even with a poultry 5400rpm HD. Also my Airport issues have gone, YAY!!
KeriJane
Mar 24, 09:08 PM
Hello.
Software Update got me a 26MB update correctly labeled Canon Printer Update 2.3 for my ip4500.
Apparently the size of the download varies.
Have Fun,
Keri
Software Update got me a 26MB update correctly labeled Canon Printer Update 2.3 for my ip4500.
Apparently the size of the download varies.
Have Fun,
Keri
miles01110
Feb 8, 11:05 AM
Will the mods entertain changing to [Resolved] status upon a request to do so in a post report?
wurgi
Mar 24, 01:29 PM
It means you should be lining up now lol.
I think any apple store will be safe for launch day. Even if its a long line, I think they'll be good with large quantities for the weekend.
No way I'm spending the night out with this cold :P Plus I'm working. I'll be heading there tomorrow at 12:30. Yeah, I think t should be fine, although I only want the 16GB White.
I think any apple store will be safe for launch day. Even if its a long line, I think they'll be good with large quantities for the weekend.
No way I'm spending the night out with this cold :P Plus I'm working. I'll be heading there tomorrow at 12:30. Yeah, I think t should be fine, although I only want the 16GB White.
sk4prez2020
Dec 28, 06:43 PM
Glad to see they are making improvements finally. I don't think that Mobile Me is worth the fee now that the "Find My iPhone" feature is free. :apple:
alust2013
Jul 28, 07:51 PM
I'm thinking the car broke down. It is no easy feat to get a car onto a flatbed without the key.
systole
Mar 26, 08:19 PM
I have been using screen in the osx terminal to get serial access, using the following:
screen telnet /dev/tty.usbserial
Unfortunately I can't scrollback in screen, which makes copying long config files a process of :apple:-C, :apple:-V, and repeat. Any suggestions for native serial support in the osx terminal app WITH scrollback?
screen telnet /dev/tty.usbserial
Unfortunately I can't scrollback in screen, which makes copying long config files a process of :apple:-C, :apple:-V, and repeat. Any suggestions for native serial support in the osx terminal app WITH scrollback?