Members in Shoutbox
None.

Shoutbox Search
Search for:


Shoutbox Commands
/w [name] > Whisper
/r > Reply to last whisper
/me > Marks as action

Shoutbox Information
Moderators may delete any and all shouts at will.
Global Shoutbox
Please log in to shout.
Pages: < 1 « 3317 3318 3319 3320 33213572 >

[2014-10-13. : 4:39 am]
Jack -- Pros use printf statements everywhere get on my level scrub! :wob:
[2014-10-13. : 4:39 am]
Dem0n -- I have no clue what any of it means, though
[2014-10-13. : 4:39 am]
Dem0n -- Yeah, I'm using valgrind
[2014-10-13. : 4:39 am]
Jack -- I think I saw that further down somewhere
[2014-10-13. : 4:39 am]
Dem0n -- updated code: http://pastebin.com/5YEb7Gpe
[2014-10-13. : 4:39 am]
Jack -- valgrind dbg?
[2014-10-13. : 4:38 am]
O)FaRTy1billion[MM] -- He's using some sort of tool for it
[2014-10-13. : 4:38 am]
Jack -- Like, how do you know
[2014-10-13. : 4:38 am]
Jack -- When you say "I get a memory leak" what do you mean by that?
[2014-10-13. : 4:38 am]
O)FaRTy1billion[MM] -- O.o that's weird. How do you get a memory leak from only reading the memory?
[2014-10-13. : 4:38 am]
Jack -- pastebin your current code?
[2014-10-13. : 4:37 am]
Dem0n -- I create the photo and print it, and after it prints, I get a memory leak
[2014-10-13. : 4:37 am]
Dem0n -- It happens after I try to print the description of the first photo
[2014-10-13. : 4:37 am]
Dem0n -- yeah
[2014-10-13. : 4:37 am]
O)FaRTy1billion[MM] -- Still occuring after removing the size--; in destroy_album and adding the size++; in add_photo_to_album?
[2014-10-13. : 4:36 am]
Sacrieur -- the proof is in the sum operation
[2014-10-13. : 4:36 am]
O)FaRTy1billion[MM] -- Is it still occuring?
[2014-10-13. : 4:36 am]
Dem0n -- still have no idea where this memory leak is occuring, though
[2014-10-13. : 4:36 am]
Sacrieur -- for all rational and irrational numbers summed, the result will always be irrational
[2014-10-13. : 4:36 am]
O)FaRTy1billion[MM] -- you can set it to 0 at the end to try and remove the possibility of trying to do something with the album after it was destroyed
[2014-10-13. : 4:34 am]
Dem0n -- yeah I got rid of that
[2014-10-13. : 4:34 am]
O)FaRTy1billion[MM] -- Also when destroying the album, you might not want to decrement album size, because that will cause the for loop to terminate early
[2014-10-13. : 4:34 am]
trgk -- [b]
[2014-10-13. : 4:34 am]
trgk -- Oh i got it
[2014-10-13. : 4:34 am]
Zoan -- Ahhh, I've got it! So the negation of the statement "For all rational and irrational numbers, their sum is irrational" is "There exists a rational and irrational number such that their sum is rational." jjf, you didn't show that the negation of the statement was false - you should that the statement "For all rational and irrational numbers their sum is rational" is false, but you would have to have shown that the statement "There exists a rational and an irrational number whose sum is rational" is false
[2014-10-13. : 4:34 am]
trgk --
[2014-10-13. : 4:34 am]
trgk -- FaRTy1billion
FaRTy1billion shouted: yeah. Or you can just put a zero-width space in there
What is zero-width space?
[2014-10-13. : 4:33 am]
Dem0n -- Oh yeah, I should just call those functions lul
[2014-10-13. : 4:33 am]
O)FaRTy1billion[MM] -- yeah. Or you can just put a zero-width space in there
[2014-10-13. : 4:33 am]
O)FaRTy1billion[MM] -- you can shove a [b][/b] in there, maybe ... test ...
[2014-10-13. : 4:33 am]
trgk -- Can I escape [ and ] here
[2014-10-13. : 4:33 am]
O)FaRTy1billion[MM] -- Also, unrelated, but you have print_photo and destroy_photo and then proceed to not use them by copying their functionality elsewhere. :P
[2014-10-13. : 4:32 am]
trgk -- a
[2014-10-13. : 4:32 am]
trgk -- []
[2014-10-13. : 4:32 am]
Dem0n -- oshit u right
[2014-10-13. : 4:32 am]
O)FaRTy1billion[MM] -- unless you are incrementing it elsewhere
[2014-10-13. : 4:31 am]
O)FaRTy1billion[MM] -- when you add photos to the album, you aren't incrementing album->size so it's overwriting the first photo every timeun
[2014-10-13. : 4:31 am]
Dem0n -- But that's not important lel
[2014-10-13. : 4:31 am]
Dem0n -- hm now that I'm reading that, I don't even think I need to change the album's size in the destroy_album() function
[2014-10-13. : 4:29 am]
Dem0n -- idk this is what I have
[2014-10-13. : 4:29 am]
O)FaRTy1billion[MM] -- As far as I know, I don't have a problem with leaky code ... Really my check is just open task manager, run the program, and then load/close/load/close a bunch of stuff over and over and see if the used memory goes up and never back down. :P
[2014-10-13. : 4:29 am]
trgk -- http://codepad.org/NFihY9uG something like this
[2014-10-13. : 4:29 am]
trgk -- If i see 'safe_malloc : %d' and don't see 'safe_free : %d', then I found a memory leak.
[2014-10-13. : 4:28 am]
O)FaRTy1billion[MM] -- just throw some duct tape on it, call a plumber later
[2014-10-13. : 4:28 am]
trgk -- they printed the address as it malloc/free to stderr, so I could that they match pair by pair as the program runs
[2014-10-13. : 4:28 am]
O)FaRTy1billion[MM] -- I just don't write leaky code :wob:
[2014-10-13. : 4:27 am]
trgk -- I usually have created custom safe_malloc and safe_free functions to find leaks
[2014-10-13. : 4:26 am]
O)FaRTy1billion[MM] -- is there any other memory that is allocated but never deallocated?
[2014-10-13. : 4:25 am]
trgk -- :(
[2014-10-13. : 4:25 am]
O)FaRTy1billion[MM] -- D:
[2014-10-13. : 4:25 am]
Dem0n -- Still a memory leak ;_;
[2014-10-13. : 4:24 am]
Dem0n -- that makes sense
[2014-10-13. : 4:24 am]
l)ark_ssj9kevin -- ya what they said
[2014-10-13. : 4:23 am]
Dem0n -- o
[2014-10-13. : 4:23 am]
O)FaRTy1billion[MM] -- free the description right before yo ufree the photo
[2014-10-13. : 4:23 am]
trgk -- Free them at where you free Photo's memory.
[2014-10-13. : 4:23 am]
Dem0n -- there's a function that prints the Photo's description, so would I free the memory after the description has been printed? But what if I want to reprint that Photo's description?
[2014-10-13. : 4:23 am]
jjf28 -- nightz :cube:
[2014-10-13. : 4:23 am]
*jjf28 mind off*
[2014-10-13. : 4:23 am]
Dem0n -- But then I also have the Photo description whose memory is dynamically allocated, and I never free that, but I have no clue where I'd free that
[2014-10-13. : 4:22 am]
Dem0n -- I have a function that creates a dynamically allocates memory to create a Photo and returns it, and then I have a function that destroys the photo, so I just deallocate the memory for that photo there
[2014-10-13. : 4:22 am]
Dem0n -- I think it's freed
[2014-10-13. : 4:20 am]
O)FaRTy1billion[MM] -- dunno. Where do you have mallocs, and is that memory freed?
[2014-10-13. : 4:20 am]
jjf28 -- comment out mallocs/recheck till it no longer occurs; brute force ftw
[2014-10-13. : 4:19 am]
Dem0n -- Wow, I have no clue where this memory leak is occurring
[2014-10-13. : 4:18 am]
O)FaRTy1billion[MM] -- because if you have "Waffles", strlen will return 7 when it really takes 8 bytes
[2014-10-13. : 4:17 am]
O)FaRTy1billion[MM] -- yes
[2014-10-13. : 4:17 am]
Dem0n -- Is the +1 for the null character?
[2014-10-13. : 4:16 am]
O)FaRTy1billion[MM] -- usually if I have a static array where I need the size of it it's defined with a #define
[2014-10-13. : 4:16 am]
O)FaRTy1billion[MM] -- I don't think I've ever done sizeof on a string or array. xD

Pages: < 1 « 3317 3318 3319 3320 33213572 >


Members Online: Milestone