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'?
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'?