Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon. Entire thread

Freeing

Name: Anonymous 2008-12-29 1:26

Is there any real point in freeing memory these days? And I don't mean freeing memory for things that constantly grow and shrink in size. I mean freeing that one array that you malloc at the beginning of the program and you need it until the end of the program. What is the benefit of freeing it when it will be automatically freed by the operating system?

Name: Anonymous 2008-12-29 20:59

>>40
Coulda
Pronounced ``cudder''

Name: Anonymous 2008-12-29 21:20

>>38
no, it'd be a security hole if your OS fails to provide the standard security features all programs rely on.  A program should reasonably expect that its memory is inaccessible to other users, no matter how or when the access attempt is made.

Name: Anonymous 2008-12-29 21:24

>>42
Oh dear.

Name: Anonymous 2008-12-29 21:30

A program should reasonably expect that its memory is inaccessible to other users, no matter how or when the access attempt is made.
a program should expect that anything it leaves in memory is accessible to anyone. any program that fails to handle it's own sensitive data properly is insecure. pretending all data is sensitive and having the operating system take care of it makes the operating system slow as fuck. having programs take care of their own sensitive data works much better.

Name: Anonymous 2008-12-29 21:42

>>42
This is why you overwrite sensitive data with random bytes after you no longer need it.

Name: Anonymous 2008-12-29 23:28

>>43-45
How the fuck is a program supposed to ``handle its own sensitive data''?  If an OS leaves memory readable by others, there is nothing the program can do to protect it.  The entire point of a multi-user operating system is to isolate privileges, including data access.  And yes, all data is sensitive unless it has been explicitly shared.  It is absolutely ridiculous to expect every program to know or care just how the user feels about a particular memory block the moment it is initialized.

Also, IHBT.

Name: Anonymous 2008-12-30 0:54

I mean, I should at least get to pick the value the memory is filled with before I get it.  I like my unallocated memory to have all ones.

IHBT as well.

Name: Anonymous 2008-12-30 1:06

>>46
the OS should protect the memory from being read by other programs while the program is using it, but once the program says it's done with it, the operating system should be able to hand that memory off to the next program that needs it without having to guess whether the data in that memory is sensitive. if the data is sensitive, the program should overwrite it before giving it back to the operating system.

Name: Anonymous 2009-03-06 7:06

Desu DESU DESU DESU   DESU DESU DESU   DESU DESU DESU   DESU DESU DESU   DESU DESU DESU   DESU DESU DESU   DESU DESU DESU   DESU DESU DESU   DESU DESU DESU   DESU DESU DESU   DESU DESU DESU   DESU DESU DESU   DESU DESU DESU   DESU DESU DESU   DESU DESU DESU   DESU DESU DESU   DESU DESU DESU   DESU DESU DESU   DESU DESU DESU   DESU DESU DESU   DESU DESU DESU.

Newer Posts
Don't change these.
Name: Email:
Entire Thread Thread List