libexplain  1.4.D001
Functions
libexplain/buffer/enomem.h File Reference
#include <libexplain/string_buffer.h>

Go to the source code of this file.

Functions

void explain_buffer_enomem_kernel (explain_string_buffer_t *sb)
void explain_buffer_enomem_user (explain_string_buffer_t *sb, size_t size)
void explain_buffer_enomem_kernel_or_user (explain_string_buffer_t *sb)
int explain_buffer_enomem_rlimit_exceeded (explain_string_buffer_t *sb, size_t size)
int explain_buffer_enomem_exhausting_swap (explain_string_buffer_t *sb)

Function Documentation

The explain_buffer_enomem_exhausting_swap function is used to print additional information when "infinite" memory is availabl, but the kernel says we have run out.

Parameters:
sbString buffer to print into.
Returns:
0 if print nothing, 1 if printed something.

Definition at line 31 of file exhausting_swap.c.

The explain_buffer_enomem function may be used to explain a 'no kernel memory' error.

Parameters:
sbThe buffer to print the explanation to

Definition at line 24 of file kernel.c.

The explain_buffer_enomem_or_user function may be used to explain a 'no user or kernel memory' error.

Parameters:
sbThe buffer to print the explanation to

Definition at line 24 of file kernel_or_user.c.

The explain_buffer_enomem_rlimit_exceeded function is used to test whether or not the given data size would exceed the process's virtual memory limit.

If it would be exceeded, a message to that effect is printed, and true (non-zero) is returned. Otherwise nothing is printed, and false (zero) is returned.

Parameters:
sbString buffer to print into.
sizeThe memory allocation size, in bytes. Or zero is unknown.
Returns:
0 if print nothing, 1 if printed something.

Definition at line 35 of file rlimit_exceeded.c.

void explain_buffer_enomem_user ( explain_string_buffer_t sb,
size_t  size 
)

The explain_buffer_enomem function may be used to explain a 'no user-space memory' error.

Parameters:
sizeThe memory allocation size, in bytes. Or zero is unknown.
sbThe buffer to print the explanation to

Definition at line 24 of file user.c.