In this blog post, I will give an introduction to a hashing methodology called Linear Hashing, which is one of the Dramatic Hashing methods.
In the man page of
malloc, there(NOTES section) is a paragraph as follows:
Normally, malloc() allocates memory from the heap, and adjusts the size of the heap as required, using sbrk(2). When allocating blocks of memory larger than MMAP_THRESHOLD bytes, the glibc malloc() implementation allocates the memory as a private anonymous mapping using mmap(2). MMAP_THRESHOLD is 128 kB by default, but is adjustable using mallopt(3). Prior to Linux 4.7 allocations performed using mmap(2) were unaffected by the RLIMIT_DATA resource limit; since Linux 4.7, this limit is also enforced for allocations performed using mmap(2).
This article explains when we should use the qualifier
explicit and when we shouldn't.
While reading Advanced Programming in the UNIX Environment, I noticed this:
#include <stdio.h> FILE* fmemopen(void *restrict buf, size_t size, const char *restrict type);
What is the keyword restrict for?
这篇文章主要总结 Linux/C 下常用的捕捉错误信息的函数用法和一些注意事项，包括strerror()、perror()、ferror()