mirror of
https://github.com/microsoft/mimalloc.git
synced 2025-07-06 19:38:41 +03:00
Enforce strict include-what-you-use policy
The include-what-you-use (IWYU) policy is beneficial to faster compilation and fewer recompilations. Many build tools, such as GNU make, provide a mechanism for automatically figuring out what .h files a .cc file depends on. These mechanisms typically look at #include lines. When unnecessary #includes are listed, the build system is more likely to recompile in cases where it is not necessary. With the enforcement, header file <include/mimalloc.h> no longer includes <stdlib.h>. Reference: https://github.com/include-what-you-use/include-what-you-use/blob/master/docs/WhyIWYU.md
This commit is contained in:
parent
fe229f8fad
commit
b5e26bedb1
8 changed files with 9 additions and 10 deletions
|
@ -8,7 +8,6 @@ terms of the MIT license. A copy of the license can be found in the file
|
|||
#ifndef MIMALLOC_TYPES_H
|
||||
#define MIMALLOC_TYPES_H
|
||||
|
||||
#include <stdlib.h> // size_t etc.
|
||||
#include <stddef.h> // ptrdiff_t
|
||||
#include <stdint.h> // uintptr_t, uint16_t, etc
|
||||
|
||||
|
|
|
@ -69,7 +69,6 @@ terms of the MIT license. A copy of the license can be found in the file
|
|||
// Includes
|
||||
// ------------------------------------------------------
|
||||
|
||||
#include <stdlib.h> // size_t, malloc etc.
|
||||
#include <stdbool.h> // bool
|
||||
#include <stdio.h> // FILE
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue