After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 744355 - Memory allocation advice is incomplete
Memory allocation advice is incomplete
Status: RESOLVED FIXED
Product: gnome-devel-docs
Classification: Applications
Component: programming-guidelines
unspecified
Other Linux
: Normal normal
: ---
Assigned To: GNOME Devel docs: Programming Guidelines maintainer(s)
gnome-devel-docs maintainers
Depends on:
Blocks:
 
 
Reported: 2015-02-11 21:42 UTC by Michael Catanzaro
Modified: 2015-02-12 14:42 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
programming-guidelines: Clarify memory management coding style (2.25 KB, patch)
2015-02-12 14:41 UTC, Philip Withnall
committed Details | Review

Description Michael Catanzaro 2015-02-11 21:42:57 UTC
We give two sentences of advice under the section Memory Allocation on the page C Coding Style [1]. The first is: "When dynamically allocating data on the heap either use g_new()."

Or...? g_slice_alloc(), perhaps?

[1] https://developer.gnome.org/programming-guidelines/unstable/c-coding-style.html.en
Comment 1 Philip Withnall 2015-02-12 14:41:48 UTC
Created attachment 296683 [details] [review]
programming-guidelines: Clarify memory management coding style

Fix an ingrammatical sentence in c-coding-style, add a cross-reference
to the memory-management page, and clarify (in a <comment>) on that page
why we don’t mention GSlice anywhere.
Comment 2 Philip Withnall 2015-02-12 14:42:15 UTC
Attachment 296683 [details] pushed as 5fca5a4 - programming-guidelines: Clarify memory management coding style