nn::socket::GetRequiredMemorySize Function

Syntax

size_t GetRequiredMemorySize(
     size_t bufferSizeForSockets,
     s32 maxSessions
);

Arguments

Name Description
in bufferSizeForSockets Number specified to the Initialize argument of the same name.
in maxSessions Number specified to the Initialize argument of the same name.

Return Values

The required work region size.

Description

Gets the minimum amount of working memory required to initialize the socket library.

The working region is used to allocate the AddrInfo values returned by the GetAddrInfo function, but it is also used temporarily during function calls. Because this value is calculated with some extra space reserved, you do not usually need to be concerned about when the working region is used. However, the required memory size is greater than the returned value when an AddrInfo value is obtained by the GetAddrInfo function but is not freed by the FreeAddrInfo function before the GetAddrInfo function is called again.

Revision History

2010/08/16
Initial version.

CONFIDENTIAL