OLD | NEW |
1 /** | 1 /** |
2 * \file lzma/hardware.h | 2 * \file lzma/hardware.h |
3 * \brief Hardware information | 3 * \brief Hardware information |
4 * | 4 * |
5 * Since liblzma can consume a lot of system resources, it also provides | 5 * Since liblzma can consume a lot of system resources, it also provides |
6 * ways to limit the resource usage. Applications linking against liblzma | 6 * ways to limit the resource usage. Applications linking against liblzma |
7 * need to do the actual decisions how much resources to let liblzma to use. | 7 * need to do the actual decisions how much resources to let liblzma to use. |
8 * To ease making these decisions, liblzma provides functions to find out | 8 * To ease making these decisions, liblzma provides functions to find out |
9 * the relevant capabilities of the underlaying hardware. Currently there | 9 * the relevant capabilities of the underlaying hardware. Currently there |
10 * is only a function to find out the amount of RAM, but in the future there | 10 * is only a function to find out the amount of RAM, but in the future there |
(...skipping 21 matching lines...) Expand all Loading... |
32 #ifndef LZMA_H_INTERNAL | 32 #ifndef LZMA_H_INTERNAL |
33 # error Never include this file directly. Use <lzma.h> instead. | 33 # error Never include this file directly. Use <lzma.h> instead. |
34 #endif | 34 #endif |
35 | 35 |
36 | 36 |
37 /** | 37 /** |
38 * \brief Get the total amount of physical memory (RAM) in bytes | 38 * \brief Get the total amount of physical memory (RAM) in bytes |
39 * | 39 * |
40 * This function may be useful when determining a reasonable memory | 40 * This function may be useful when determining a reasonable memory |
41 * usage limit for decompressing or how much memory it is OK to use | 41 * usage limit for decompressing or how much memory it is OK to use |
42 * for compressing. For example, the default limit used by the xz | 42 * for compressing. |
43 * command line tool is 40 % of RAM. | |
44 * | 43 * |
45 * \return On success, the total amount of physical memory in bytes | 44 * \return On success, the total amount of physical memory in bytes |
46 * is returned. If the amount of RAM cannot be determined, | 45 * is returned. If the amount of RAM cannot be determined, |
47 * zero is returned. This can happen if an error occurs | 46 * zero is returned. This can happen if an error occurs |
48 * or if there is no code in liblzma to detect the amount | 47 * or if there is no code in liblzma to detect the amount |
49 * of RAM on the specific operating system. | 48 * of RAM on the specific operating system. |
50 */ | 49 */ |
51 extern LZMA_API(uint64_t) lzma_physmem(void) lzma_nothrow; | 50 extern LZMA_API(uint64_t) lzma_physmem(void) lzma_nothrow; |
OLD | NEW |