Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
ruanhaishen
redis
Commits
9a635431
Commit
9a635431
authored
Dec 17, 2014
by
antirez
Browse files
Add info as requested by the original getMemorySize() license.
parent
615f6923
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/zmalloc.c
View file @
9a635431
...
...
@@ -368,7 +368,15 @@ size_t zmalloc_get_private_dirty(void) {
/* Returns the size of physical memory (RAM) in bytes.
* It looks ugly, but this is the cleanest way to achive cross platform results.
* Cleaned up from:
*
* http://nadeausoftware.com/articles/2012/09/c_c_tip_how_get_physical_memory_size_system
*
* Note that this function:
* 1) Was released under the following CC attribution license:
* http://creativecommons.org/licenses/by/3.0/deed.en_US.
* 2) Was originally implemented by David Robert Nadeau.
* 3) Was modified for Redis by Matt Stancliff.
* 4) This note exists in order to comply with the original license.
*/
size_t
zmalloc_get_memory_size
(
void
)
{
#if defined(__unix__) || defined(__unix) || defined(unix) || \
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment