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

Pages: 1-

C question 'bout malloc

Name: Anonymous 2018-10-19 4:41

Yo peeps
dis here been somethin' dat has bothered me fo' ages now.

we's all taught in skoo (at least, ah wuz) dat you mus' free every pointer dat iz allocated. ah'm 'bit curious, though, 'bout the real cost o' not freeing memory. In some obvious cases, like when malloc iz called inside uh loop or part o' uh thread execution, it's very important ta free so dere is nah memory leaks. But consider da following:

if ah gots code dat's somethin` like dis here:

int main()
{
char *a = malloc(1024);
/* Do some arbitrary sheit wif 'a' (nahh alloc functions used) */
return 0;
}

wuts da real result here? muh motha fuckin thinkin` iz dat da process dies an' then da heap space iz gone anyway so dere's nahh harm in missing da page ta free (however, ah do recognize da importance o' havin` it anyway fo' closure, maintainability, an' pimp-tight good practice). wod ah be right in dis here thinkin`? Ya' know what I'm sayin'?

Name: Anonymous 2018-10-19 4:54

Δεν υπάρχει λόγος να ελεφθερόσεις την μνήμι αν σκοπεύεις να κλίσεις το πρόγραμα κατευθίαν. Το λιτουργικό σύστιμα θα το κανονίσει.

Name: Anonymous 2018-10-19 7:56

You rite nigguh, if da proce$$ exits all tha memory alloced git freed

Name: Hysteron Proteron 2018-10-19 11:51

>>2
Δεν υπάρχει λόγος να ελεφθερόσεις την μνήμι αν σκοπεύεις να κλίσεις το πρόγραμα κατευθίαν. Το λιτουργικό σύστιμα θα το κανονίσει.

"Den hyparchei logos na elephtheroseis ten mnemi an skopeueis na klitheis to programa kateuthian. To litourgiko systima tha to kanonisei."

It's all Greek to me, but I will defend to the agreement your right to say it.

Name: Anonymous 2018-10-20 2:12

is that you, lambda?

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