diff options
| author | Peter Bengtsson <mail@peterbe.com> | 2020-12-08 14:40:17 -0500 |
|---|---|---|
| committer | Peter Bengtsson <mail@peterbe.com> | 2020-12-08 14:40:17 -0500 |
| commit | 33058f2b292b3a581333bdfb21b8f671898c5060 (patch) | |
| tree | 51c3e392513ec574331b2d3f85c394445ea803c6 /files/zh-cn/mozilla/projects/nspr | |
| parent | 8b66d724f7caf0157093fb09cfec8fbd0c6ad50a (diff) | |
| download | translated-content-33058f2b292b3a581333bdfb21b8f671898c5060.tar.gz translated-content-33058f2b292b3a581333bdfb21b8f671898c5060.tar.bz2 translated-content-33058f2b292b3a581333bdfb21b8f671898c5060.zip | |
initial commit
Diffstat (limited to 'files/zh-cn/mozilla/projects/nspr')
3 files changed, 1254 insertions, 0 deletions
diff --git a/files/zh-cn/mozilla/projects/nspr/index.html b/files/zh-cn/mozilla/projects/nspr/index.html new file mode 100644 index 0000000000..2ae2b7b9d5 --- /dev/null +++ b/files/zh-cn/mozilla/projects/nspr/index.html @@ -0,0 +1,60 @@ +--- +title: NSPR +slug: Mozilla/Projects/NSPR +translation_of: Mozilla/Projects/NSPR +--- +<h2 id="Netscape_Portable_Runtime_(NSPR)_提供一套面向系统级的与平台无关的_API_和类似于libc的函数._这些API被用在Mozilla客户端_Red_Hat公司、Sun公司的服务应用程序以及其他公司的一些软件中。"><strong>Netscape Portable Runtime</strong> (<strong>NSPR</strong>) 提供一套面向系统级的与平台无关的 API 和类似于libc的函数. 这些API被用在Mozilla客户端, Red Hat公司、Sun公司的服务应用程序以及其他公司的一些软件中。</h2> +<table class="topicpage-table"> + <tbody> + <tr> + <td> + <h2 id="Documentation" name="Documentation"><a href="/Special:Tags?tag=NSPR&language=en" title="Special:Tags?tag=NSPR&language=en">文档</a></h2> + <dl> + <dt> + <a class="external" href="http://www.mozilla.org/projects/nspr/">NSPR工程页面</a></dt> + <dd> + <small>Contains some older technical notes and training materials. (at mozilla.org)</small></dd> + </dl> + <dl> + <dt> + <a href="/en/About_NSPR" title="en/About_NSPR">关于 NSPR</a></dt> + <dd> + <small>This topic describes, in general terms, the goals of NSPR and a bit about how it does it.</small></dd> + </dl> + <dl> + <dt> + <a href="/en/NSPR_API_Reference" title="en/NSPR_API_Reference">NSPR API Reference</a></dt> + <dd> + <small>The reference describes each API public macro, structure and function in the NSPR API.</small></dd> + </dl> + <dl> + <dt> + <a href="/en/NSPR_build_instructions" title="en/NSPR_build_instructions">NSPR build instructions</a></dt> + <dd> + <small>How to checkout and build from source.</small></dd> + </dl> + <dl> + <dt> + <a href="/en/NSPR_release_process" title="en/NSPR_release_process">NSPR release process</a></dt> + <dd> + <small>How to prepare an NSPR release.</small></dd> + </dl> + <p><span class="alllinks"><a href="/Special:Tags?tag=NSPR&language=en" title="Special:Tags?tag=NSPR&language=en">View All...</a></span></p> + </td> + <td> + <h2 id="Community" name="Community">Community</h2> + <ul> + <li>View Mozilla forums...</li> + </ul> + <p>{{ DiscussionList("dev-tech-nspr", "mozilla.dev.tech.nspr") }}</p> + <h2 id="Related_Topics" name="Related_Topics">Related Topics</h2> + <dl> + <dd> + <a href="/en/Necko" title="en/Necko">Necko</a>, <a href="/en/NSS" title="en/NSS">NSS</a></dd> + </dl> + </td> + </tr> + </tbody> +</table> +<p> </p> +<p>{{ languages( { "ja": "ja/NSPR", "it": "it/NSPR" } ) }}</p> diff --git a/files/zh-cn/mozilla/projects/nspr/reference/index.html b/files/zh-cn/mozilla/projects/nspr/reference/index.html new file mode 100644 index 0000000000..fe690af267 --- /dev/null +++ b/files/zh-cn/mozilla/projects/nspr/reference/index.html @@ -0,0 +1,770 @@ +--- +title: NSPR API Reference +slug: Mozilla/Projects/NSPR/Reference +tags: + - NSPR + - NSPR_API_Reference + - NeedsTranslation + - TopicStub +translation_of: Mozilla/Projects/NSPR/Reference +--- +<section id="Quick_Links"> +<ol> + <li><a href="/en-US/docs/Mozilla/Projects/NSPR">NSPR</a></li> + <li><a href="/en-US/docs/Mozilla/Projects/NSPR/About_NSPR">About NSPR</a></li> + <li><a href="/en-US/docs/Mozilla/Projects/NSPR/Reference">NSPR API Reference</a></li> + <li><a href="/en-US/docs/Mozilla/Projects/NSPR/NSPR_build_instructions">NSPR Build Instruction</a></li> + <li><a href="/en-US/docs/Mozilla/Projects/NSPR/Release_process">NSPR Release Process</a></li> + <li class="toggle"> + <details> + <summary>Introduction to NSPR</summary> + <ol> + <li><a href="/en-US/docs/Mozilla/Projects/NSPR/Reference/Introduction_to_NSPR#NSPR_Naming_Conventions">NSPR Naming Conventions</a></li> + <li><a href="/en-US/docs/Mozilla/Projects/NSPR/Reference/Introduction_to_NSPR#NSPR_Threads">NSPR Threads</a> + <ol> + <li><a href="/en-US/docs/Mozilla/Projects/NSPR/Reference/Introduction_to_NSPR#Thread_Schedoling">Thread Scheduling</a> + <ol> + <li><a href="/en-US/docs/Mozilla/Projects/NSPR/Reference/Introduction_to_NSPR#Setting_Thread_Priorities">Setting Thread Priorities</a></li> + <li><a href="/en-US/docs/Mozilla/Projects/NSPR/Reference/Introduction_to_NSPR#Preempting_Threads">Preempting Threads</a></li> + <li><a href="/en-US/docs/Mozilla/Projects/NSPR/Reference/Introduction_to_NSPR#Interrupting_Threads">Interrupting Threads</a></li> + </ol> + </li> + </ol> + </li> + <li><a href="/en-US/docs/Mozilla/Projects/NSPR/Reference/Introduction_to_NSPR#NSPR_Thread_Synchronization">NSPR Thread Synchronization</a> + <ol> + <li><a href="/en-US/docs/Mozilla/Projects/NSPR/Reference/Introduction_to_NSPR#Locks_and_Monitors">Locks and Monitors</a></li> + <li><a href="/en-US/docs/Mozilla/Projects/NSPR/Reference/Introduction_to_NSPR#Condition_Variables">Condition Variables</a></li> + </ol> + </li> + <li><a href="/en-US/docs/Mozilla/Projects/NSPR/Reference/Introduction_to_NSPR#NSPR_Sample_Code">NSPR Sample Code</a></li> + </ol> + </details> + </li> + <li class="toggle"> + <details> + <summary>NSPR Types</summary> + <ol> + <li><a href="/en-US/docs/Mozilla/Projects/NSPR/Reference/NSPR_Types#Calling_Convention_Types">Calling Convention Types</a></li> + <li><a href="/en-US/docs/Mozilla/Projects/NSPR/Reference/NSPR_Types#Algebraic_Types">Algebraic Types</a> + <ol> + <li><a href="/en-US/docs/Mozilla/Projects/NSPR/Reference/NSPR_Types#8-.2C_16-.2C_and_32-bit_Integer_Types">8-, 16-, and 32-bit Integer Types</a> + <ol> + <li><a href="/en-US/docs/Mozilla/Projects/NSPR/Reference/NSPR_Types#Signed_Integers">Signed Integers</a></li> + <li><a href="/en-US/docs/Mozilla/Projects/NSPR/Reference/NSPR_Types#Unsigned_Integers">Unsigned Integers</a></li> + </ol> + </li> + <li><a href="/en-US/docs/Mozilla/Projects/NSPR/Reference/NSPR_Types#64-bit_Integer_Types">64-bit Integer Types</a></li> + <li><a href="/en-US/docs/Mozilla/Projects/NSPR/Reference/NSPR_Types#Floating-Point_Number_Type">Floating-Point Integer Type</a></li> + <li><a href="/en-US/docs/Mozilla/Projects/NSPR/Reference/NSPR_Types#Native_OS_Integer_Types">Native OS Integer Types</a></li> + </ol> + </li> + <li><a href="/en-US/docs/Mozilla/Projects/NSPR/Reference/NSPR_Types#Miscellaneous_Types">Miscellaneous Types</a> + <ol> + <li><a href="/en-US/docs/Mozilla/Projects/NSPR/Reference/NSPR_Types#Size_Type">Size Type</a></li> + <li><a href="/en-US/docs/Mozilla/Projects/NSPR/Reference/NSPR_Types#Pointer_Difference_Types">Pointer Difference Types</a></li> + <li><a href="/en-US/docs/Mozilla/Projects/NSPR/Reference/NSPR_Types#Boolean_Types">Boolean Types</a></li> + <li><a href="/en-US/docs/Mozilla/Projects/NSPR/Reference/NSPR_Types#Status_Type_for_Return_Values">Status Type for Return Values</a></li> + </ol> + </li> + </ol> + </details> + </li> + <li class="toggle"> + <details> + <summary>Threads</summary> + <ol> + <li><a href="/en-US/docs/Mozilla/Projects/NSPR/Reference/Threads#Threading_Types_and_Constants">Threading Types and Constants</a></li> + <li><a href="/en-US/docs/Mozilla/Projects/NSPR/Reference/Threads#Threading_Functions">Threading Functions</a> + <ol> + <li><a href="/en-US/docs/Mozilla/Projects/NSPR/Reference/Threads#Creating.2C_Joining.2C_and_Identifying_Threads">Creating, Joining, and Identifying Threads</a></li> + <li><a href="/en-US/docs/Mozilla/Projects/NSPR/Reference/Threads#Controlling_Thread_Priorities">Controlling Thread Priorities</a></li> + <li><a href="/en-US/docs/Mozilla/Projects/NSPR/Reference/Threads#Controlling_Per-Thread_Private_Data">Controlling Per-Thread Private Data</a></li> + <li><a href="/en-US/docs/Mozilla/Projects/NSPR/Reference/Threads#Interrupting_and_Yielding">Interrupting and Yielding</a></li> + <li><a href="/en-US/docs/Mozilla/Projects/NSPR/Reference/Threads#Setting_Global_Thread_Concurrency">Setting Global Thread Concurrency</a></li> + <li><a href="/en-US/docs/Mozilla/Projects/NSPR/Reference/Threads#Getting_a_Thread.27s_Scope">Getting a Thread's Scope</a></li> + </ol> + </li> + </ol> + </details> + </li> + <li class="toggle"> + <details> + <summary>Process Initialization</summary> + <ol> + <li><a href="/en-US/docs/Mozilla/Projects/NSPR/Reference/Process_Initialization#Identity_and_Versioning">Identity and Versioning</a> + <ol> + <li><a href="/en-US/docs/Mozilla/Projects/NSPR/Reference/Process_Initialization#Name_and_Version_Constants">Name and Version Constants</a></li> + </ol> + </li> + <li><a href="/en-US/docs/Mozilla/Projects/NSPR/Reference/Process_Initialization#Initialization_and_Cleanup">Initialization and Cleanup</a></li> + <li><a href="/en-US/docs/Mozilla/Projects/NSPR/Reference/Process_Initialization#Module_Initialization">Module Initialization</a></li> + </ol> + </details> + </li> + <li class="toggle"> + <details> + <summary>Locks</summary> + <ol> + <li><a href="/en-US/docs/Mozilla/Projects/NSPR/Reference/Locks#Lock_Type">Lock Type</a></li> + <li><a href="/en-US/docs/Mozilla/Projects/NSPR/Reference/Locks#Lock_Functions">Lock Functions</a></li> + </ol> + </details> + </li> + <li class="toggle"> + <details> + <summary>Condition Variables</summary> + <ol> + <li><a href="/en-US/docs/Mozilla/Projects/NSPR/Reference/Condition_Variables#Condition_Variable_Type">Condition Variable Type</a></li> + <li><a href="/en-US/docs/Mozilla/Projects/NSPR/Reference/Condition_Variables#Condition_Variable_Functions">Condition Variable Functions</a></li> + </ol> + </details> + </li> + <li class="toggle"> + <details> + <summary>Monitors</summary> + <ol> + <li><a href="/en-US/docs/Mozilla/Projects/NSPR/Reference/Monitors#Monitor_Type">Monitor Type</a></li> + <li><a href="/en-US/docs/Mozilla/Projects/NSPR/Reference/Monitors#Monitor_Functions">Monitor Functions</a></li> + </ol> + </details> + </li> + <li class="toggle"> + <details> + <summary>Cached Monitors</summary> + <ol> + <li><a href="/en-US/docs/Mozilla/Projects/NSPR/Reference/Cached_Monitors#Cached_Monitor_Functions">Cached Monitor Functions</a></li> + </ol> + </details> + </li> + <li class="toggle"> + <details> + <summary>I/O Types</summary> + <ol> + <li><a href="/en-US/docs/Mozilla/Projects/NSPR/Reference/I_O_Types#Directory_Type">Directory Type</a></li> + <li><a href="/en-US/docs/Mozilla/Projects/NSPR/Reference/I_O_Types#File_Descriptor_Types">File Descriptor Types</a></li> + <li><a href="/en-US/docs/Mozilla/Projects/NSPR/Reference/I_O_Types#File_Info_Types">File Info Types</a></li> + <li><a href="/en-US/docs/Mozilla/Projects/NSPR/Reference/I_O_Types#Network_Address_Types">Network Address Types</a></li> + <li><a href="/en-US/docs/Mozilla/Projects/NSPR/Reference/I_O_Types#Types_Used_with_Socket_Options_Functions">Types Used with Socket Options Functions</a></li> + <li><a href="/en-US/docs/Mozilla/Projects/NSPR/Reference/I_O_Types#Type_Used_with_Memory-Mapped_I.2FO">Type Used with Memory-Mapped I/O</a></li> + <li><a href="/en-US/docs/Mozilla/Projects/NSPR/Reference/I_O_Types#Offset_Interpretation_for_Seek_Functions">Offset Interpretation for Seek Functions</a></li> + </ol> + </details> + </li> + <li class="toggle"> + <details> + <summary>I/O Functions</summary> + <ol> + <li><a href="/en-US/docs/Mozilla/Projects/NSPR/Reference/I_O_Functions#Functions_that_Operate_on_Pathnames">Functions that Operate on Pathnames</a></li> + <li><a href="/en-US/docs/Mozilla/Projects/NSPR/Reference/I_O_Functions#Functions_that_Act_on_File_Descriptors">Functions that Act on File Descriptors</a></li> + <li><a href="/en-US/docs/Mozilla/Projects/NSPR/Reference/I_O_Functions#Directory_I.2FO_Functions">Directory I/O Functions</a></li> + <li><a href="/en-US/docs/Mozilla/Projects/NSPR/Reference/I_O_Functions#Socket_Manipolation_Functions">Socket Manipolation Functions</a></li> + <li><a href="/en-US/docs/Mozilla/Projects/NSPR/Reference/I_O_Functions#Converting_Between_Host_and_Network_Addresses">Converting Between Host and Network Addresses</a></li> + <li><a href="/en-US/docs/Mozilla/Projects/NSPR/Reference/I_O_Functions#Memory-Mapped_I.2FO_Functions">Memory-Mapped I/O Functions</a></li> + <li><a href="/en-US/docs/Mozilla/Projects/NSPR/Reference/I_O_Functions#Anonymous_Pipe_Function">Anonymous Pipe Function</a></li> + <li><a href="/en-US/docs/Mozilla/Projects/NSPR/Reference/I_O_Functions#Polling_Functions">Polling Functions</a></li> + <li><a href="/en-US/docs/Mozilla/Projects/NSPR/Reference/I_O_Functions#Pollable_Events">Pollable Events</a></li> + <li><a href="/en-US/docs/Mozilla/Projects/NSPR/Reference/I_O_Functions#Manipulating_Layers">Manipulating Layers</a></li> + </ol> + </details> + </li> + <li class="toggle"> + <details> + <summary>Network Addresses</summary> + <ol> + <li><a href="/en-US/docs/Mozilla/Projects/NSPR/Reference/Network_Addresses#Network_Address_Types_and_Constants">Network Address Types and Constants</a></li> + <li><a href="/en-US/docs/Mozilla/Projects/NSPR/Reference/Network_Addresses#Network_Address_Functions">Network Address Functions</a></li> + </ol> + </details> + </li> + <li class="toggle"> + <details> + <summary>Atomic Operations</summary> + <ol> + <li><a href="/en-US/docs/Mozilla/Projects/NSPR/Reference/PR_AtomicIncrement">PR_AtomicIncrement</a></li> + <li><a href="/en-US/docs/Mozilla/Projects/NSPR/Reference/PR_AtomicDecrement">PR_AtomicDecrement</a></li> + <li><a href="/en-US/docs/Mozilla/Projects/NSPR/Reference/PR_AtomicSet">PR_AtomicSet</a></li> + </ol> + </details> + </li> + <li class="toggle"> + <details> + <summary>Interval Timing</summary> + <ol> + <li><a href="/en-US/docs/Mozilla/Projects/NSPR/Reference/Interval_Timing#Interval_Time_Type_and_Constants">Interval Time Type and Constants</a></li> + <li><a href="/en-US/docs/Mozilla/Projects/NSPR/Reference/Interval_Timing#Interval_Functions">Interval Functions</a></li> + </ol> + </details> + </li> + <li class="toggle"> + <details> + <summary>Date and Time</summary> + <ol> + <li><a href="/en-US/docs/Mozilla/Projects/NSPR/Reference/Date_and_Time#Types_and_Constants">Types and Constants</a></li> + <li><a href="/en-US/docs/Mozilla/Projects/NSPR/Reference/Date_and_Time#Time_Parameter_Callback_Functions">Time Parameter Callback Functions</a></li> + <li><a href="/en-US/docs/Mozilla/Projects/NSPR/Reference/Date_and_Time#Functions">Functions</a></li> + </ol> + </details> + </li> + <li class="toggle"> + <details> + <summary>Memory Management Operations</summary> + <ol> + <li><a href="/en-US/docs/Mozilla/Projects/NSPR/Reference/Memory_Management_Operations#Memory_Allocation_Functions">Memory Allocation Functions</a></li> + <li><a href="/en-US/docs/Mozilla/Projects/NSPR/Reference/Memory_Management_Operations#Memory_Allocation_Macros">Memory Allocation Macros</a></li> + </ol> + </details> + </li> + <li class="toggle"> + <details> + <summary>String Operations</summary> + <ol> + <li><a href="/en-US/docs/Mozilla/Projects/NSPR/Reference/PL_strlen">PL_strlen</a></li> + <li><a href="/en-US/docs/Mozilla/Projects/NSPR/Reference/PL_strcpy">PL_strcpy</a></li> + <li><a href="/en-US/docs/Mozilla/Projects/NSPR/Reference/PL_strdup">PL_strdup</a></li> + <li><a href="/en-US/docs/Mozilla/Projects/NSPR/Reference/PL_strfree">PL_strfree</a></li> + </ol> + </details> + </li> + <li class="toggle"> + <details> + <summary>Floating Point Number to String Conversion</summary> + <ol> + <li><a href="/en-US/docs/Mozilla/Projects/NSPR/Reference/PR_strtod">PR_strtod</a></li> + <li><a href="/en-US/docs/Mozilla/Projects/NSPR/Reference/PR_dtoa">PR_dtoa</a></li> + <li><a href="/en-US/docs/Mozilla/Projects/NSPR/Reference/PR_cnvtf">PR_cnvtf</a></li> + </ol> + </details> + </li> + <li class="toggle"> + <details> + <summary>Linked Lists</summary> + <ol> + <li><a href="/en-US/docs/Mozilla/Projects/NSPR/Reference/Linked_Lists#Linked_List_Types">Linked List Types</a> + <ol> + <li><a href="/en-US/docs/Mozilla/Projects/NSPR/Reference/PRCList">PRCList</a></li> + </ol> + </li> + <li><a href="/en-US/docs/Mozilla/Projects/NSPR/Reference/Linked_Lists#Linked_List_Macros">Linked List Macros</a> + <ol> + <li><a href="/en-US/docs/Mozilla/Projects/NSPR/Reference/PR_INIT_CLIST">PR_INIT_CLIST</a></li> + <li><a href="/en-US/docs/Mozilla/Projects/NSPR/Reference/PR_INIT_STATIC_CLIST">PR_INIT_STATIC_CLIST</a></li> + <li><a href="/en-US/docs/Mozilla/Projects/NSPR/Reference/PR_APPEND_LINK">PR_APPEND_LINK</a></li> + <li><a href="/en-US/docs/Mozilla/Projects/NSPR/Reference/PR_INSERT_LINK">PR_INSERT_LINK</a></li> + <li><a href="/en-US/docs/Mozilla/Projects/NSPR/Reference/PR_NEXT_LINK">PR_NEXT_LINK</a></li> + <li><a href="/en-US/docs/Mozilla/Projects/NSPR/Reference/PR_PREV_LINK">PR_PREV_LINK</a></li> + <li><a href="/en-US/docs/Mozilla/Projects/NSPR/Reference/PR_REMOVE_LINK">PR_REMOVE_LINK</a></li> + <li><a href="/en-US/docs/Mozilla/Projects/NSPR/Reference/PR_REMOVE_AND_INIT_LINK">PR_REMOVE_AND_INIT_LINK</a></li> + <li><a href="/en-US/docs/Mozilla/Projects/NSPR/Reference/PR_INSERT_BEFORE">PR_INSERT_BEFORE</a></li> + <li><a href="/en-US/docs/Mozilla/Projects/NSPR/Reference/PR_INSERT_AFTER">PR_INSERT_AFTER</a></li> + </ol> + </li> + </ol> + </details> + </li> + <li class="toggle"> + <details> + <summary>Dynamic Library Linking</summary> + <ol> + <li><a href="/en-US/docs/Mozilla/Projects/NSPR/Reference/Dynamic_Library_Linking#Library_Linking_Types">Library Linking Types</a> + <ol> + <li><a href="/en-US/docs/Mozilla/Projects/NSPR/Reference/PRLibrary">PRLibrary</a></li> + <li><a href="/en-US/docs/Mozilla/Projects/NSPR/Reference/PRStaticLinkTable">PRStaticLinkTable</a></li> + </ol> + </li> + <li><a href="/en-US/docs/Mozilla/Projects/NSPR/Reference/Dynamic_Library_Linking#Library_Linking_Functions">Library Linking Functions</a> + <ol> + <li><a href="/en-US/docs/Mozilla/Projects/NSPR/Reference/PR_SetLibraryPath">PR_SetLibraryPath</a></li> + <li><a href="/en-US/docs/Mozilla/Projects/NSPR/Reference/PR_GetLibraryPath">PR_GetLibraryPath</a></li> + <li><a href="/en-US/docs/Mozilla/Projects/NSPR/Reference/PR_GetLibraryName">PR_GetLibraryName</a></li> + <li><a href="/en-US/docs/Mozilla/Projects/NSPR/Reference/PR_FreeLibraryName">PR_FreeLibraryName</a></li> + <li><a href="/en-US/docs/Mozilla/Projects/NSPR/Reference/PR_LoadLibrary">PR_LoadLibrary</a></li> + <li><a href="/en-US/docs/Mozilla/Projects/NSPR/Reference/PR_UnloadLibrary">PR_UnloadLibrary</a></li> + <li><a href="/en-US/docs/Mozilla/Projects/NSPR/Reference/PR_FindSymbol">PR_FindSymbol</a></li> + <li><a href="/en-US/docs/Mozilla/Projects/NSPR/Reference/PR_FindSymbolAndLibrary">PR_FindSymbolAndLibrary</a></li> + <li><a href="/en-US/docs/Mozilla/Projects/NSPR/Reference/Dynamic_Library_Linking#Finding_Symbols_Defined_in_the_Main_Executable_Program">Finding Symbols Defined in the Main Executable Program</a></li> + </ol> + </li> + <li><a href="/en-US/docs/Mozilla/Projects/NSPR/Reference/Dynamic_Library_Linking#Platform_Notes">Platform Notes</a> + <ol> + <li><a href="/en-US/docs/Mozilla/Projects/NSPR/Reference/Dynamic_Library_Linking#Dynamic_Library_Search_Path">Dynamic Library Search Path</a></li> + <li><a href="/en-US/docs/Mozilla/Projects/NSPR/Reference/Dynamic_Library_Linking#Exporting_Symbols_from_the_Main_Executable_Program">Exporting Symbols from the Main Executable Program</a></li> + </ol> + </li> + </ol> + </details> + </li> + <li class="toggle"> + <details> + <summary>Process Management and Interprocess Communication</summary> + <ol> + <li><a href="/en-US/docs/Mozilla/Projects/NSPR/Reference/Process_Management_and_Interprocess_Communication#Process_Management_Types_and_Constants">Process Management Types and Constants</a> + <ol> + <li><a href="/en-US/docs/Mozilla/Projects/NSPR/Reference/PRProcess">PRProcess</a></li> + <li><a href="/en-US/docs/Mozilla/Projects/NSPR/Reference/PRProcessAttr">PRProcessAttr</a></li> + </ol> + </li> + <li><a href="/en-US/en-US/docs/Mozilla/Projects/NSPR/Reference/Process_Management_and_Interprocess_Communication#Process_Management_Functions">Process Management Functions</a> + <ol> + <li><a href="/en-US/docs/Mozilla/Projects/NSPR/Reference/Process_Management_and_Interprocess_Communication#Setting_the_Attributes_of_a_New_Process">Setting the Attributes of a New Process</a></li> + <li><a href="/en-US/docs/Mozilla/Projects/NSPR/Reference/Process_Management_and_Interprocess_Communication#Creating_and_Managing_Processes">Creating and Managing Processes</a></li> + </ol> + </li> + </ol> + </details> + </li> + <li class="toggle"> + <details> + <summary>Logging</summary> + <ol> + <li><a href="/en-US/docs/Mozilla/Projects/NSPR/Reference/Logging#Conditional_Compilation_and_Execution">Conditional Compilation and Execution</a></li> + <li><a href="/en-US/docs/Mozilla/Projects/NSPR/Reference/Logging#Log_Types_and_Variables">Log Types and Variables</a> + <ol> + <li><a href="/en-US/docs/Mozilla/Projects/NSPR/Reference/PRLogModoleInfo">PRLogModoleInfo</a></li> + <li><a href="/en-US/docs/Mozilla/Projects/NSPR/Reference/PRLogModoleLevel">PRLogModoleLevel</a></li> + <li><a href="/en-US/docs/Mozilla/Projects/NSPR/Reference/NSPR_LOG_MODULES">NSPR_LOG_MODULES</a></li> + <li><a href="/en-US/docs/Mozilla/Projects/NSPR/Reference/NSPR_LOG_FILE">NSPR_LOG_FILE</a></li> + </ol> + </li> + <li><a href="/en-US/docs/Mozilla/Projects/NSPR/Reference/Logging#Logging_Functions_and_Macros">Logging Functions and Macros</a> + <ol> + <li><a href="/en-US/docs/Mozilla/Projects/NSPR/Reference/PR_NewLogModole">PR_NewLogModole</a></li> + <li><a href="/en-US/docs/Mozilla/Projects/NSPR/Reference/PR_SetLogFile">PR_SetLogFile</a></li> + <li><a href="/en-US/docs/Mozilla/Projects/NSPR/Reference/PR_SetLogBuffering">PR_SetLogBuffering</a>/li> + </li><li><a href="/en-US/docs/Mozilla/Projects/NSPR/Reference/PR_LogPrint">PR_LogPrint</a></li> + <li><a href="/en-US/docs/Mozilla/Projects/NSPR/Reference/PR_LogFlush">PR_LogFlush</a></li> + <li><a href="/en-US/docs/Mozilla/Projects/NSPR/Reference/PR_LOG_TEST">PR_LOG_TEST</a></li> + <li><a href="/en-US/docs/Mozilla/Projects/NSPR/Reference/PR_LOG">PR_LOG</a></li> + <li><a href="/en-US/docs/Mozilla/Projects/NSPR/Reference/PR_Assert_">PR_Assert</a></li> + <li><a href="/en-US/docs/Mozilla/Projects/NSPR/Reference/PR_ASSERT">PR_ASSERT</a></li> + <li><a href="/en-US/docs/Mozilla/Projects/NSPR/Reference/PR_NOT_REACHED">PR_NOT_REACHED</a></li> + </ol> + </li> + <li><a href="/en-US/docs/Mozilla/Projects/NSPR/Reference/Logging#Use_Example">Use Example</a></li> + </ol> + </details> + </li> + <li class="toggle"> + <details> + <summary>Named Shared Memory</summary> + <ol> + <li><a href="/en-US/docs/Mozilla/Projects/NSPR/Reference/Named_Shared_Memory#Shared_Memory_Protocol">Shared Memory Protocol</a></li> + <li><a href="/en-US/docs/Mozilla/Projects/NSPR/Reference/Named_Shared_Memory#Named_Shared_Memory_Functions">Named Shared Memory Functions</a></li> + </ol> + </details> + </li> + <li class="toggle"> + <details> + <summary>Anonymous Shared Memory</summary> + <ol> + <li><a href="/en-US/docs/Mozilla/Projects/NSPR/Reference/Anonymous_Shared_Memory#Anonymous_Memory_Protocol">Anonymous Memory Protocol</a></li> + <li><a href="/en-US/docs/Mozilla/Projects/NSPR/Reference/Anonymous_Shared_Memory#Anonymous_Shared_Memory_Functions">Anonymous Shared Memory Functions</a></li> + </ol> + </details> + </li> + <li class="toggle"> + <details> + <summary>IPC Semaphores</summary> + <ol> + <li><a href="/en-US/docs/Mozilla/Projects/NSPR/Reference/IPC_Semaphores#IPC_Semaphore_Functions">IPC Semaphore Functions</a></li> + </ol> + </details> + </li> + <li class="toggle"> + <details> + <summary>Thread Pools</summary> + <ol> + <li><a href="/en-US/docs/Mozilla/Projects/NSPR/Reference/Thread_Pools#Thread_Pool_Types">Thread Pool Types</a></li> + <li><a href="/en-US/docs/Mozilla/Projects/NSPR/Reference/Thread_Pools#Thread_Pool_Functions">Thread Pool Functions</a></li> + </ol> + </details> + </li> + <li class="toggle"> + <details> + <summary>Random Number Generator</summary> + <ol> + <li><a href="/en-US/docs/Mozilla/Projects/NSPR/Reference/Random_Number_Generator#Random_Number_Generator_Function">Random Number Generator Function</a></li> + </ol> + </details> + </li> + <li class="toggle"> + <details> + <summary>Hash Tables</summary> + <ol> + <li><a href="/en-US/docs/Mozilla/Projects/NSPR/Reference/Hash_Tables#Hash_Tables_and_Type_Constants">Hash Tables and Type Constants</a></li> + <li><a href="/en-US/docs/Mozilla/Projects/NSPR/Reference/Hash_Tables#Hash_Table_Functions">Hash Table Functions</a></li> + </ol> + </details> + </li> + <li class="toggle"> + <details> + <summary>NSPR Error Handling</summary> + <ol> + <li><a href="/en-US/docs/Mozilla/Projects/NSPR/Reference/NSPR_Error_Handling#Error_Type">Error Type</a></li> + <li><a href="/en-US/docs/Mozilla/Projects/NSPR/Reference/NSPR_Error_Handling#Error_Functions">Error Functions</a></li> + <li><a href="/en-US/docs/Mozilla/Projects/NSPR/Reference/NSPR_Error_Handling#Error_Codes">Error Codes</a></li> + </ol> + </details> + </li> + <li class="toggle"> + <details> + <summary>Contribute</summary> + <ol> + <li><a href="/en-US/docs/MDN/Doc_status/NSPR"></a></li> + <li><a href="/en-US/docs/MDN">The MDN Project</a></li> + </ol> + </details> + </li> + </ol> +</section> + +<h2 id="Introduction_to_NSPR" name="Introduction_to_NSPR"><a href="/Mozilla/Projects/NSPR/Reference/Introduction_to_NSPR">Introduction to NSPR</a></h2> + +<ul> + <li><a href="/Mozilla/Projects/NSPR/Reference/Introduction_to_NSPR#NSPR_Naming_Conventions">NSPR Naming Conventions</a></li> + <li><a href="/Mozilla/Projects/NSPR/Reference/Introduction_to_NSPR#NSPR_Threads">NSPR Threads</a> + <ul> + <li><a href="/Mozilla/Projects/NSPR/Reference/Introduction_to_NSPR#Thread_Scheduling">Thread Scheduling</a> + <ul> + <li><a href="/Mozilla/Projects/NSPR/Reference/Introduction_to_NSPR#Setting_Thread_Priorities">Setting Thread Priorities</a></li> + <li><a href="/Mozilla/Projects/NSPR/Reference/Introduction_to_NSPR#Preempting_Threads">Preempting Threads</a></li> + <li><a href="/Mozilla/Projects/NSPR/Reference/Introduction_to_NSPR#Interrupting_Threads">Interrupting Threads</a></li> + </ul> + </li> + </ul> + </li> + <li><a href="/Mozilla/Projects/NSPR/Reference/Introduction_to_NSPR#NSPR_Thread_Synchronization">NSPR Thread Synchronization</a> + <ul> + <li><a href="/Mozilla/Projects/NSPR/Reference/Introduction_to_NSPR#Locks_and_Monitors">Locks and Monitors</a></li> + <li><a href="/Mozilla/Projects/NSPR/Reference/Introduction_to_NSPR#Condition_Variables">Condition Variables</a></li> + </ul> + </li> + <li><a href="/Mozilla/Projects/NSPR/Reference/Introduction_to_NSPR#NSPR_Sample_Code">NSPR Sample Code</a></li> +</ul> + +<h2 id="NSPR_Types" name="NSPR_Types"><a href="/Mozilla/Projects/NSPR/Reference/NSPR_Types">NSPR Types</a></h2> + +<ul> + <li><a href="/Mozilla/Projects/NSPR/Reference/NSPR_Types#Calling_Convention_Types">Calling Convention Types</a></li> + <li><a href="/Mozilla/Projects/NSPR/Reference/NSPR_Types#Algebraic_Types">Algebraic Types</a> + <ul> + <li><a href="/Mozilla/Projects/NSPR/Reference/NSPR_Types#8-.2C_16-.2C_and_32-bit_Integer_Types">8-, 16-, and 32-bit Integer Types</a> + <ul> + <li><a href="/Mozilla/Projects/NSPR/Reference/NSPR_Types#Signed_Integers">Signed Integers</a></li> + <li><a href="/Mozilla/Projects/NSPR/Reference/NSPR_Types#Unsigned_Integers">Unsigned Integers</a></li> + </ul> + </li> + <li><a href="/Mozilla/Projects/NSPR/Reference/NSPR_Types#64-bit_Integer_Types">64-bit Integer Types</a></li> + <li><a href="/Mozilla/Projects/NSPR/Reference/NSPR_Types#Floating-Point_Number_Type">Floating-Point Integer Type</a></li> + <li><a href="/Mozilla/Projects/NSPR/Reference/NSPR_Types#Native_OS_Integer_Types">Native OS Integer Types</a></li> + </ul> + </li> + <li><a href="/Mozilla/Projects/NSPR/Reference/NSPR_Types#Miscellaneous_Types">Miscellaneous Types</a> + <ul> + <li><a href="/Mozilla/Projects/NSPR/Reference/NSPR_Types#Size_Type">Size Type</a></li> + <li><a href="/Mozilla/Projects/NSPR/Reference/NSPR_Types#Pointer_Difference_Types">Pointer Difference Types</a></li> + <li><a href="/Mozilla/Projects/NSPR/Reference/NSPR_Types#Boolean_Types">Boolean Types</a></li> + <li><a href="/Mozilla/Projects/NSPR/Reference/NSPR_Types#Status_Type_for_Return_Values">Status Type for Return Values</a></li> + </ul> + </li> +</ul> + +<h2 id="Threads" name="Threads"><a href="/Mozilla/Projects/NSPR/Reference/Threads">Threads</a></h2> + +<ul> + <li><a href="/Mozilla/Projects/NSPR/Reference/Threads#Threading_Types_and_Constants">Threading Types and Constants</a></li> + <li><a href="/Mozilla/Projects/NSPR/Reference/Threads#Threading_Functions">Threading Functions</a> + <ul> + <li><a href="/Mozilla/Projects/NSPR/Reference/Threads#Creating.2C_Joining.2C_and_Identifying_Threads">Creating, Joining, and Identifying Threads</a></li> + <li><a href="/Mozilla/Projects/NSPR/Reference/Threads#Controlling_Thread_Priorities">Controlling Thread Priorities</a></li> + <li><a href="/Mozilla/Projects/NSPR/Reference/Threads#Controlling_Per-Thread_Private_Data">Controlling Per-Thread Private Data</a></li> + <li><a href="/Mozilla/Projects/NSPR/Reference/Threads#Interrupting_and_Yielding">Interrupting and Yielding</a></li> + <li><a href="/Mozilla/Projects/NSPR/Reference/Threads#Setting_Global_Thread_Concurrency">Setting Global Thread Concurrency</a></li> + <li><a href="/Mozilla/Projects/NSPR/Reference/Threads#Getting_a_Thread.27s_Scope">Getting a Thread's Scope</a></li> + </ul> + </li> +</ul> + +<h2 id="Process_Initialization" name="Process_Initialization"><a href="/Mozilla/Projects/NSPR/Reference/Process_Initialization">Process Initialization</a></h2> + +<ul> + <li><a href="/Mozilla/Projects/NSPR/Reference/Process_Initialization#Identity_and_Versioning">Identity and Versioning</a> + + <ul> + <li><a href="/Mozilla/Projects/NSPR/Reference/Process_Initialization#Name_and_Version_Constants">Name and Version Constants</a></li> + </ul> + </li> + <li><a href="/Mozilla/Projects/NSPR/Reference/Process_Initialization#Initialization_and_Cleanup">Initialization and Cleanup</a></li> + <li><a href="/Mozilla/Projects/NSPR/Reference/Process_Initialization#Module_Initialization">Module Initialization</a></li> +</ul> + +<h2 id="Locks" name="Locks"><a href="/Mozilla/Projects/NSPR/Reference/Locks">Locks</a></h2> + +<ul> + <li><a href="/Mozilla/Projects/NSPR/Reference/Locks#Lock_Type">Lock Type</a></li> + <li><a href="/Mozilla/Projects/NSPR/Reference/Locks#Lock_Functions">Lock Functions</a></li> +</ul> + +<h2 id="Condition_Variables" name="Condition_Variables"><a href="/Mozilla/Projects/NSPR/Reference/Condition_Variables">Condition Variables</a></h2> + +<ul> + <li><a href="/Mozilla/Projects/NSPR/Reference/Condition_Variables#Condition_Variable_Type">Condition Variable Type</a></li> + <li><a href="/Mozilla/Projects/NSPR/Reference/Condition_Variables#Condition_Variable_Functions">Condition Variable Functions</a></li> +</ul> + +<h2 id="Monitors" name="Monitors"><a href="/Mozilla/Projects/NSPR/Reference/Monitors">Monitors</a></h2> + +<ul> + <li><a href="/Mozilla/Projects/NSPR/Reference/Monitors#Monitor_Type">Monitor Type</a></li> + <li><a href="/Mozilla/Projects/NSPR/Reference/Monitors#Monitor_Functions">Monitor Functions</a></li> +</ul> + +<h2 id="Cached_Monitors" name="Cached_Monitors"><a href="/Mozilla/Projects/NSPR/Reference/Cached_Monitors">Cached Monitors</a></h2> + +<ul> + <li><a href="/Mozilla/Projects/NSPR/Reference/Cached_Monitors#Cached_Monitor_Functions">Cached Monitor Functions</a></li> +</ul> + +<h2 id="I.2FO_Types" name="I.2FO_Types"><a href="/Mozilla/Projects/NSPR/Reference/I_O_Types">I/O Types</a></h2> + +<ul> + <li><a href="/Mozilla/Projects/NSPR/Reference/I_O_Types#Directory_Type">Directory Type</a></li> + <li><a href="/Mozilla/Projects/NSPR/Reference/I_O_Types#File_Descriptor_Types">File Descriptor Types</a></li> + <li><a href="/Mozilla/Projects/NSPR/Reference/I_O_Types#File_Info_Types">File Info Types</a></li> + <li><a href="/Mozilla/Projects/NSPR/Reference/I_O_Types#Network_Address_Types">Network Address Types</a></li> + <li><a href="/Mozilla/Projects/NSPR/Reference/I_O_Types#Types_Used_with_Socket_Options_Functions">Types Used with Socket Options Functions</a></li> + <li><a href="/Mozilla/Projects/NSPR/Reference/I_O_Types#Type_Used_with_Memory-Mapped_I.2FO">Type Used with Memory-Mapped I/O</a></li> + <li><a href="/Mozilla/Projects/NSPR/Reference/I_O_Types#Offset_Interpretation_for_Seek_Functions">Offset Interpretation for Seek Functions</a></li> +</ul> + +<h2 id="I.2FO_Functions" name="I.2FO_Functions"><a href="/Mozilla/Projects/NSPR/Reference/I_O_Functions">I/O Functions</a></h2> + +<ul> + <li><a href="/Mozilla/Projects/NSPR/Reference/I_O_Functions#Functions_that_Operate_on_Pathnames">Functions that Operate on Pathnames</a></li> + <li><a href="/Mozilla/Projects/NSPR/Reference/I_O_Functions#Functions_that_Act_on_File_Descriptors">Functions that Act on File Descriptors</a></li> + <li><a href="/Mozilla/Projects/NSPR/Reference/I_O_Functions#Directory_I.2FO_Functions">Directory I/O Functions</a></li> + <li><a href="/Mozilla/Projects/NSPR/Reference/I_O_Functions#Socket_Manipulation_Functions">Socket Manipulation Functions</a></li> + <li><a href="/Mozilla/Projects/NSPR/Reference/I_O_Functions#Converting_Between_Host_and_Network_Addresses">Converting Between Host and Network Addresses</a></li> + <li><a href="/Mozilla/Projects/NSPR/Reference/I_O_Functions#Memory-Mapped_I.2FO_Functions">Memory-Mapped I/O Functions</a></li> + <li><a href="/Mozilla/Projects/NSPR/Reference/I_O_Functions#Anonymous_Pipe_Function">Anonymous Pipe Function</a></li> + <li><a href="/Mozilla/Projects/NSPR/Reference/I_O_Functions#Polling_Functions">Polling Functions</a></li> + <li><a href="/Mozilla/Projects/NSPR/Reference/I_O_Functions#Pollable_Events">Pollable Events</a></li> + <li><a href="/Mozilla/Projects/NSPR/Reference/I_O_Functions#Manipulating_Layers">Manipulating Layers</a></li> +</ul> + +<h2 id="Network_Addresses" name="Network_Addresses"><a href="/Mozilla/Projects/NSPR/Reference/Network_Addresses">Network Addresses</a></h2> + +<ul> + <li><a href="/Mozilla/Projects/NSPR/Reference/Network_Addresses#Network_Address_Types_and_Constants">Network Address Types and Constants</a></li> + <li><a href="/Mozilla/Projects/NSPR/Reference/Network_Addresses#Network_Address_Functions">Network Address Functions</a></li> +</ul> + +<h2 id="Atomic_Operations" name="Atomic_Operations"><a href="/Mozilla/Projects/NSPR/Reference/Atomic_Operations">Atomic Operations</a></h2> + +<ul> + <li><code><a href="/Mozilla/Projects/NSPR/Reference/PR_AtomicIncrement">PR_AtomicIncrement</a></code></li> + <li><code><a href="/Mozilla/Projects/NSPR/Reference/PR_AtomicDecrement">PR_AtomicDecrement</a></code></li> + <li><code><a href="/Mozilla/Projects/NSPR/Reference/PR_AtomicSet">PR_AtomicSet</a></code></li> +</ul> + +<h2 id="Interval_Timing" name="Interval_Timing"><a href="/Mozilla/Projects/NSPR/Reference/Interval_Timing">Interval Timing</a></h2> + +<ul> + <li><a href="/Mozilla/Projects/NSPR/Reference/Interval_Timing#Interval_Time_Type_and_Constants">Interval Time Type and Constants</a></li> + <li><a href="/Mozilla/Projects/NSPR/Reference/Interval_Timing#Interval_Functions">Interval Functions</a></li> +</ul> + +<h2 id="Date_and_Time" name="Date_and_Time"><a href="/Mozilla/Projects/NSPR/Reference/Date_and_Time">Date and Time</a></h2> + +<ul> + <li><a href="/Mozilla/Projects/NSPR/Reference/Date_and_Time#Types_and_Constants">Types and Constants</a></li> + <li><a href="/Mozilla/Projects/NSPR/Reference/Date_and_Time#Time_Parameter_Callback_Functions">Time Parameter Callback Functions</a></li> + <li><a href="/Mozilla/Projects/NSPR/Reference/Date_and_Time#Functions">Functions</a></li> +</ul> + +<h2 id="Memory_Management_Operations" name="Memory_Management_Operations"><a href="/Mozilla/Projects/NSPR/Reference/Memory_Management_Operations">Memory Management Operations</a></h2> + +<ul> + <li><a href="/Mozilla/Projects/NSPR/Reference/Memory_Management_Operations#Memory_Allocation_Functions">Memory Allocation Functions</a></li> + <li><a href="/Mozilla/Projects/NSPR/Reference/Memory_Management_Operations#Memory_Allocation_Macros">Memory Allocation Macros</a></li> +</ul> + +<h2 id="String_Operations" name="String_Operations"><a href="/Mozilla/Projects/NSPR/Reference/String_Operations">String Operations</a></h2> + +<ul> + <li><code><a href="/Mozilla/Projects/NSPR/Reference/PL_strlen">PL_strlen</a></code></li> + <li><code><a href="/Mozilla/Projects/NSPR/Reference/PL_strcpy">PL_strcpy</a></code></li> + <li><code><a href="/Mozilla/Projects/NSPR/Reference/PL_strdup">PL_strdup</a></code></li> + <li><code><a href="/Mozilla/Projects/NSPR/Reference/PL_strfree">PL_strfree</a></code></li> +</ul> + +<h2 id="Floating_Point_Number_to_String_Conversion" name="Floating_Point_Number_to_String_Conversion"><a href="/Mozilla/Projects/NSPR/Reference/Floating_Point_Number_to_String_Conversion">Floating Point Number to String Conversion</a></h2> + +<ul> + <li><code><a href="/Mozilla/Projects/NSPR/Reference/PR_strtod">PR_strtod</a></code></li> + <li><code><a href="/Mozilla/Projects/NSPR/Reference/PR_dtoa">PR_dtoa</a></code></li> + <li><code><a href="/Mozilla/Projects/NSPR/Reference/PR_cnvtf">PR_cnvtf</a></code></li> +</ul> + +<h2 id="Long_Long_.2864-bit.29_Integers" name="Long_Long_.2864-bit.29_Integers">Long Long (64-bit) Integers</h2> + +<h2 id="BitMaps" name="BitMaps">BitMaps</h2> + +<h2 id="Formatted_Printing" name="Formatted_Printing">Formatted Printing</h2> + +<h2 id="Linked_Lists" name="Linked_Lists"><a href="/Mozilla/Projects/NSPR/Reference/Linked_Lists">Linked Lists</a></h2> + +<ul> + <li><a href="/Mozilla/Projects/NSPR/Reference/Linked_Lists#Linked_List_Types">Linked List Types</a> + + <ul> + <li><code><a href="/Mozilla/Projects/NSPR/Reference/PRCList">PRCList</a></code></li> + </ul> + </li> + <li><a href="/Mozilla/Projects/NSPR/Reference/Linked_Lists#Linked_List_Macros">Linked List Macros</a> + <ul> + <li><code><a href="/Mozilla/Projects/NSPR/Reference/PR_INIT_CLIST">PR_INIT_CLIST</a></code></li> + <li><code><a href="/Mozilla/Projects/NSPR/Reference/PR_INIT_STATIC_CLIST">PR_INIT_STATIC_CLIST</a></code></li> + <li><code><a href="/Mozilla/Projects/NSPR/Reference/PR_APPEND_LINK">PR_APPEND_LINK</a></code></li> + <li><code><a href="/Mozilla/Projects/NSPR/Reference/PR_INSERT_LINK">PR_INSERT_LINK</a></code></li> + <li><code><a href="/Mozilla/Projects/NSPR/Reference/PR_NEXT_LINK">PR_NEXT_LINK</a></code></li> + <li><code><a href="/Mozilla/Projects/NSPR/Reference/PR_PREV_LINK">PR_PREV_LINK</a></code></li> + <li><code><a href="/Mozilla/Projects/NSPR/Reference/PR_REMOVE_LINK">PR_REMOVE_LINK</a></code></li> + <li><code><a href="/Mozilla/Projects/NSPR/Reference/PR_REMOVE_AND_INIT_LINK">PR_REMOVE_AND_INIT_LINK</a></code></li> + <li><code><a href="/Mozilla/Projects/NSPR/Reference/PR_INSERT_BEFORE">PR_INSERT_BEFORE</a></code></li> + <li><code><a href="/Mozilla/Projects/NSPR/Reference/PR_INSERT_AFTER">PR_INSERT_AFTER</a></code></li> + </ul> + </li> +</ul> + +<h2 id="Dynamic_Library_Linking" name="Dynamic_Library_Linking"><a href="/Mozilla/Projects/NSPR/Reference/Dynamic_Library_Linking">Dynamic Library Linking</a></h2> + +<ul> + <li><a href="/Mozilla/Projects/NSPR/Reference/Dynamic_Library_Linking#Library_Linking_Types">Library Linking Types</a> + + <ul> + <li><code><a href="/Mozilla/Projects/NSPR/Reference/PRLibrary">PRLibrary</a></code></li> + <li><code><a href="/Mozilla/Projects/NSPR/Reference/PRStaticLinkTable">PRStaticLinkTable</a></code></li> + </ul> + </li> + <li><a href="/Mozilla/Projects/NSPR/Reference/Dynamic_Library_Linking#Library_Linking_Functions">Library Linking Functions</a> + <ul> + <li><code><a href="/Mozilla/Projects/NSPR/Reference/PR_SetLibraryPath">PR_SetLibraryPath</a></code></li> + <li><code><a href="/Mozilla/Projects/NSPR/Reference/PR_GetLibraryPath">PR_GetLibraryPath</a></code></li> + <li><code><a href="/Mozilla/Projects/NSPR/Reference/PR_GetLibraryName">PR_GetLibraryName</a></code></li> + <li><code><a href="/Mozilla/Projects/NSPR/Reference/PR_FreeLibraryName">PR_FreeLibraryName</a></code></li> + <li><code><a href="/Mozilla/Projects/NSPR/Reference/PR_LoadLibrary">PR_LoadLibrary</a></code></li> + <li><code><a href="/Mozilla/Projects/NSPR/Reference/PR_UnloadLibrary">PR_UnloadLibrary</a></code></li> + <li><code><a href="/Mozilla/Projects/NSPR/Reference/PR_FindSymbol">PR_FindSymbol</a></code></li> + <li><code><a href="/Mozilla/Projects/NSPR/Reference/PR_FindSymbolAndLibrary">PR_FindSymbolAndLibrary</a></code></li> + <li><a href="/Mozilla/Projects/NSPR/Reference/Dynamic_Library_Linking#Finding_Symbols_Defined_in_the_Main_Executable_Program">Finding Symbols Defined in the Main Executable Program</a></li> + </ul> + </li> + <li><a href="/Mozilla/Projects/NSPR/Reference/Dynamic_Library_Linking#Platform_Notes">Platform Notes</a> + <ul> + <li><a href="/Mozilla/Projects/NSPR/Reference/Dynamic_Library_Linking#Dynamic_Library_Search_Path">Dynamic Library Search Path</a></li> + <li><a href="/Mozilla/Projects/NSPR/Reference/Dynamic_Library_Linking#Exporting_Symbols_from_the_Main_Executable_Program">Exporting Symbols from the Main Executable Program </a></li> + </ul> + </li> +</ul> + +<h2 id="Process_Management_and_Interprocess_Communication" name="Process_Management_and_Interprocess_Communication"><a href="/En/NSPR_API_Reference/Process_Management_and_Interprocess_Communication">Process Management and Interprocess Communication</a></h2> + +<ul> + <li><a class="internal" href="/En/NSPR_API_Reference/Process_Management_and_Interprocess_Communication#Process_Management_Types_and_Constants">Process Management Types and Constants</a> + + <ul> + <li><code><a class="internal" href="/En/PRProcess">PRProcess</a></code></li> + <li><code><a class="internal" href="/En/PRProcessAttr">PRProcessAttr</a></code></li> + </ul> + </li> + <li><a class="internal" href="/En/NSPR_API_Reference/Process_Management_and_Interprocess_Communication#Process_Management_Functions">Process Management Functions</a> + <ul> + <li><a class="internal" href="/En/NSPR_API_Reference/Process_Management_and_Interprocess_Communication#Setting_the_Attributes_of_a_New_Process">Setting the Attributes of a New Process</a></li> + <li><a class="internal" href="/En/NSPR_API_Reference/Process_Management_and_Interprocess_Communication#Creating_and_Managing_Processes">Creating and Managing Processes</a></li> + </ul> + </li> +</ul> + +<h2 id="Multiwait_Receive" name="Multiwait_Receive">Multiwait Receive</h2> + +<h2 id="System_Information_and_Environment_Variables" name="System_Information_and_Environment_Variables">System Information and Environment Variables</h2> + +<h2 id="Logging" name="Logging"><a href="/NSPR_API_Reference/Logging">Logging</a></h2> + +<ul> + <li><a href="/NSPR_API_Reference/Logging#Conditional_Compilation_and_Execution">Conditional Compilation and Execution</a></li> + <li><a href="/NSPR_API_Reference/Logging#Log_Types_and_Variables">Log Types and Variables</a> + <ul> + <li><code><a href="/docs/Mozilla/Projects/NSPR/Reference/Logging/PRLogModuleInfo">PRLogModuleInfo</a></code></li> + <li><code><a href="/docs/Mozilla/Projects/NSPR/Reference/Logging/PRLogModuleLevel">PRLogModuleLevel</a></code></li> + <li><code><a href="/docs/Mozilla/Projects/NSPR/Reference/Logging/NSPR_LOG_MODULES">NSPR_LOG_MODULES</a></code></li> + <li><code><a href="/docs/Mozilla/Projects/NSPR/Reference/Logging/NSPR_LOG_FILE">NSPR_LOG_FILE</a></code></li> + </ul> + </li> + <li><a href="/NSPR_API_Reference/Logging#Logging_Functions_and_Macros">Logging Functions and Macros</a> + <ul> + <li><code><a href="PR_NewLogModule">PR_NewLogModule</a></code></li> + <li><code><a href="PR_SetLogFile">PR_SetLogFile</a></code></li> + <li><code><a href="PR_SetLogBuffering">PR_SetLogBuffering</a></code></li> + <li><code><a href="PR_LogPrint">PR_LogPrint</a></code></li> + <li><code><a href="PR_LogFlush">PR_LogFlush</a></code></li> + <li><code><a href="PR_LOG_TEST">PR_LOG_TEST</a></code></li> + <li><code><a href="PR_LOG">PR_LOG</a></code></li> + <li><code><a href="PR_Assert_">PR_Assert</a></code></li> + <li><a href="/en-US/docs/Mozilla/Projects/NSPR/Reference/PR_ASSERT">PR_ASSERT</a></li> + <li><code><a href="PR_NOT_REACHED">PR_NOT_REACHED</a></code></li> + </ul> + </li> + <li><a href="/NSPR_API_Reference/Logging#Use_Example">Use Example</a></li> +</ul> + +<h2 id="Instrumentation_Counters" name="Instrumentation_Counters">Instrumentation Counters</h2> + +<h2 id="Named_Shared_Memory" name="Named_Shared_Memory"><a href="/Mozilla/Projects/NSPR/Reference/Named_Shared_Memory">Named Shared Memory</a></h2> + +<ul> + <li><a href="/Mozilla/Projects/NSPR/Reference/Named_Shared_Memory#Shared_Memory_Protocol">Shared Memory Protocol</a></li> + <li><a href="/Mozilla/Projects/NSPR/Reference/Named_Shared_Memory#Named_Shared_Memory_Functions">Named Shared Memory Functions</a></li> +</ul> + +<h2 id="Anonymous_Shared_Memory" name="Anonymous_Shared_Memory"><a href="/Mozilla/Projects/NSPR/Reference/Anonymous_Shared_Memory">Anonymous Shared Memory</a></h2> + +<ul> + <li><a href="/Mozilla/Projects/NSPR/Reference/Anonymous_Shared_Memory#Anonymous_Memory_Protocol">Anonymous Memory Protocol</a></li> + <li><a href="/Mozilla/Projects/NSPR/Reference/Anonymous_Shared_Memory#Anonymous_Shared_Memory_Functions">Anonymous Shared Memory Functions</a></li> +</ul> + +<h2 id="IPC_Semaphores" name="IPC_Semaphores"><a href="/Mozilla/Projects/NSPR/Reference/IPC_Semaphores">IPC Semaphores</a></h2> + +<ul> + <li><a href="/Mozilla/Projects/NSPR/Reference/IPC_Semaphores#IPC_Semaphore_Functions">IPC Semaphore Functions</a></li> +</ul> + +<h2 id="Thread_Pools" name="Thread_Pools"><a href="/Mozilla/Projects/NSPR/Reference/Thread_Pools">Thread Pools</a></h2> + +<ul> + <li><a href="/Mozilla/Projects/NSPR/Reference/Thread_Pools#Thread_Pool_Types">Thread Pool Types</a></li> + <li><a href="/Mozilla/Projects/NSPR/Reference/Thread_Pools#Thread_Pool_Functions">Thread Pool Functions</a></li> +</ul> + +<h2 id="Random_Number_Generator" name="Random_Number_Generator"><a href="/Mozilla/Projects/NSPR/Reference/Random_Number_Generator">Random Number Generator</a></h2> + +<ul> + <li><a href="/Mozilla/Projects/NSPR/Reference/Random_Number_Generator#Random_Number_Generator_Function">Random Number Generator Function</a></li> +</ul> + +<h2 id="Hash_Tables" name="Hash_Tables"><a href="/Mozilla/Projects/NSPR/Reference/Hash_Tables">Hash Tables</a></h2> + +<ul> + <li><a href="/Mozilla/Projects/NSPR/Reference/Hash_Tables#Hash_Tables_and_Type_Constants">Hash Tables and Type Constants</a></li> + <li><a href="/Mozilla/Projects/NSPR/Reference/Hash_Tables#Hash_Table_Functions">Hash Table Functions</a></li> +</ul> + +<h2 id="NSPR_Error_Handling" name="NSPR_Error_Handling"><a href="/Mozilla/Projects/NSPR/Reference/NSPR_Error_Handling">NSPR Error Handling</a></h2> + +<ul> + <li><a href="/Mozilla/Projects/NSPR/Reference/NSPR_Error_Handling#Error_Type">Error Type</a></li> + <li><a href="/Mozilla/Projects/NSPR/Reference/NSPR_Error_Handling#Error_Functions">Error Functions</a></li> + <li><a href="/Mozilla/Projects/NSPR/Reference/NSPR_Error_Handling#Error_Codes">Error Codes</a></li> +</ul> diff --git a/files/zh-cn/mozilla/projects/nspr/reference/memory_management_operations/index.html b/files/zh-cn/mozilla/projects/nspr/reference/memory_management_operations/index.html new file mode 100644 index 0000000000..9fbb05ae70 --- /dev/null +++ b/files/zh-cn/mozilla/projects/nspr/reference/memory_management_operations/index.html @@ -0,0 +1,424 @@ +--- +title: 内存管理操作 +slug: Mozilla/Projects/NSPR/Reference/Memory_Management_Operations +tags: + - GC + - NSPR +translation_of: Mozilla/Projects/NSPR/Reference/Memory_Management_Operations +--- +<section id="Quick_Links"> +<ol> + <li><a href="/en-US/docs/Mozilla/Projects/NSPR">NSPR</a></li> + <li><a href="/en-US/docs/Mozilla/Projects/NSPR/About_NSPR">About NSPR</a></li> + <li><a href="/en-US/docs/Mozilla/Projects/NSPR/Reference">NSPR API Reference</a></li> + <li><a href="/en-US/docs/Mozilla/Projects/NSPR/NSPR_build_instructions">NSPR Build Instruction</a></li> + <li><a href="/en-US/docs/Mozilla/Projects/NSPR/Release_process">NSPR Release Process</a></li> + <li class="toggle"> + <details><summary>Introduction to NSPR</summary> + <ol> + <li><a href="/en-US/docs/Mozilla/Projects/NSPR/Reference/Introduction_to_NSPR#NSPR_Naming_Conventions">NSPR Naming Conventions</a></li> + <li><a href="/en-US/docs/Mozilla/Projects/NSPR/Reference/Introduction_to_NSPR#NSPR_Threads">NSPR Threads</a> + <ol> + <li><a href="/en-US/docs/Mozilla/Projects/NSPR/Reference/Introduction_to_NSPR#Thread_Schedoling">Thread Scheduling</a> + <ol> + <li><a href="/en-US/docs/Mozilla/Projects/NSPR/Reference/Introduction_to_NSPR#Setting_Thread_Priorities">Setting Thread Priorities</a></li> + <li><a href="/en-US/docs/Mozilla/Projects/NSPR/Reference/Introduction_to_NSPR#Preempting_Threads">Preempting Threads</a></li> + <li><a href="/en-US/docs/Mozilla/Projects/NSPR/Reference/Introduction_to_NSPR#Interrupting_Threads">Interrupting Threads</a></li> + </ol> + </li> + </ol> + </li> + <li><a href="/en-US/docs/Mozilla/Projects/NSPR/Reference/Introduction_to_NSPR#NSPR_Thread_Synchronization">NSPR Thread Synchronization</a> + <ol> + <li><a href="/en-US/docs/Mozilla/Projects/NSPR/Reference/Introduction_to_NSPR#Locks_and_Monitors">Locks and Monitors</a></li> + <li><a href="/en-US/docs/Mozilla/Projects/NSPR/Reference/Introduction_to_NSPR#Condition_Variables">Condition Variables</a></li> + </ol> + </li> + <li><a href="/en-US/docs/Mozilla/Projects/NSPR/Reference/Introduction_to_NSPR#NSPR_Sample_Code">NSPR Sample Code</a></li> + </ol> + </details> + </li> + <li class="toggle"> + <details><summary>NSPR Types</summary> + <ol> + <li><a href="/en-US/docs/Mozilla/Projects/NSPR/Reference/NSPR_Types#Calling_Convention_Types">Calling Convention Types</a></li> + <li><a href="/en-US/docs/Mozilla/Projects/NSPR/Reference/NSPR_Types#Algebraic_Types">Algebraic Types</a> + <ol> + <li><a href="/en-US/docs/Mozilla/Projects/NSPR/Reference/NSPR_Types#8-.2C_16-.2C_and_32-bit_Integer_Types">8-, 16-, and 32-bit Integer Types</a> + <ol> + <li><a href="/en-US/docs/Mozilla/Projects/NSPR/Reference/NSPR_Types#Signed_Integers">Signed Integers</a></li> + <li><a href="/en-US/docs/Mozilla/Projects/NSPR/Reference/NSPR_Types#Unsigned_Integers">Unsigned Integers</a></li> + </ol> + </li> + <li><a href="/en-US/docs/Mozilla/Projects/NSPR/Reference/NSPR_Types#64-bit_Integer_Types">64-bit Integer Types</a></li> + <li><a href="/en-US/docs/Mozilla/Projects/NSPR/Reference/NSPR_Types#Floating-Point_Number_Type">Floating-Point Integer Type</a></li> + <li><a href="/en-US/docs/Mozilla/Projects/NSPR/Reference/NSPR_Types#Native_OS_Integer_Types">Native OS Integer Types</a></li> + </ol> + </li> + <li><a href="/en-US/docs/Mozilla/Projects/NSPR/Reference/NSPR_Types#Miscellaneous_Types">Miscellaneous Types</a> + <ol> + <li><a href="/en-US/docs/Mozilla/Projects/NSPR/Reference/NSPR_Types#Size_Type">Size Type</a></li> + <li><a href="/en-US/docs/Mozilla/Projects/NSPR/Reference/NSPR_Types#Pointer_Difference_Types">Pointer Difference Types</a></li> + <li><a href="/en-US/docs/Mozilla/Projects/NSPR/Reference/NSPR_Types#Boolean_Types">Boolean Types</a></li> + <li><a href="/en-US/docs/Mozilla/Projects/NSPR/Reference/NSPR_Types#Status_Type_for_Return_Values">Status Type for Return Values</a></li> + </ol> + </li> + </ol> + </details> + </li> + <li class="toggle"> + <details><summary>Threads</summary> + <ol> + <li><a href="/en-US/docs/Mozilla/Projects/NSPR/Reference/Threads#Threading_Types_and_Constants">Threading Types and Constants</a></li> + <li><a href="/en-US/docs/Mozilla/Projects/NSPR/Reference/Threads#Threading_Functions">Threading Functions</a> + <ol> + <li><a href="/en-US/docs/Mozilla/Projects/NSPR/Reference/Threads#Creating.2C_Joining.2C_and_Identifying_Threads">Creating, Joining, and Identifying Threads</a></li> + <li><a href="/en-US/docs/Mozilla/Projects/NSPR/Reference/Threads#Controlling_Thread_Priorities">Controlling Thread Priorities</a></li> + <li><a href="/en-US/docs/Mozilla/Projects/NSPR/Reference/Threads#Controlling_Per-Thread_Private_Data">Controlling Per-Thread Private Data</a></li> + <li><a href="/en-US/docs/Mozilla/Projects/NSPR/Reference/Threads#Interrupting_and_Yielding">Interrupting and Yielding</a></li> + <li><a href="/en-US/docs/Mozilla/Projects/NSPR/Reference/Threads#Setting_Global_Thread_Concurrency">Setting Global Thread Concurrency</a></li> + <li><a href="/en-US/docs/Mozilla/Projects/NSPR/Reference/Threads#Getting_a_Thread.27s_Scope">Getting a Thread's Scope</a></li> + </ol> + </li> + </ol> + </details> + </li> + <li class="toggle"> + <details><summary>Process Initialization</summary> + <ol> + <li><a href="/en-US/docs/Mozilla/Projects/NSPR/Reference/Process_Initialization#Identity_and_Versioning">Identity and Versioning</a> + <ol> + <li><a href="/en-US/docs/Mozilla/Projects/NSPR/Reference/Process_Initialization#Name_and_Version_Constants">Name and Version Constants</a></li> + </ol> + </li> + <li><a href="/en-US/docs/Mozilla/Projects/NSPR/Reference/Process_Initialization#Initialization_and_Cleanup">Initialization and Cleanup</a></li> + <li><a href="/en-US/docs/Mozilla/Projects/NSPR/Reference/Process_Initialization#Module_Initialization">Module Initialization</a></li> + </ol> + </details> + </li> + <li class="toggle"> + <details><summary>Locks</summary> + <ol> + <li><a href="/en-US/docs/Mozilla/Projects/NSPR/Reference/Locks#Lock_Type">Lock Type</a></li> + <li><a href="/en-US/docs/Mozilla/Projects/NSPR/Reference/Locks#Lock_Functions">Lock Functions</a></li> + </ol> + </details> + </li> + <li class="toggle"> + <details><summary>Condition Variables</summary> + <ol> + <li><a href="/en-US/docs/Mozilla/Projects/NSPR/Reference/Condition_Variables#Condition_Variable_Type">Condition Variable Type</a></li> + <li><a href="/en-US/docs/Mozilla/Projects/NSPR/Reference/Condition_Variables#Condition_Variable_Functions">Condition Variable Functions</a></li> + </ol> + </details> + </li> + <li class="toggle"> + <details><summary>Monitors</summary> + <ol> + <li><a href="/en-US/docs/Mozilla/Projects/NSPR/Reference/Monitors#Monitor_Type">Monitor Type</a></li> + <li><a href="/en-US/docs/Mozilla/Projects/NSPR/Reference/Monitors#Monitor_Functions">Monitor Functions</a></li> + </ol> + </details> + </li> + <li class="toggle"> + <details><summary>Cached Monitors</summary> + <ol> + <li><a href="/en-US/docs/Mozilla/Projects/NSPR/Reference/Cached_Monitors#Cached_Monitor_Functions">Cached Monitor Functions</a></li> + </ol> + </details> + </li> + <li class="toggle"> + <details><summary>I/O Types</summary> + <ol> + <li><a href="/en-US/docs/Mozilla/Projects/NSPR/Reference/I_O_Types#Directory_Type">Directory Type</a></li> + <li><a href="/en-US/docs/Mozilla/Projects/NSPR/Reference/I_O_Types#File_Descriptor_Types">File Descriptor Types</a></li> + <li><a href="/en-US/docs/Mozilla/Projects/NSPR/Reference/I_O_Types#File_Info_Types">File Info Types</a></li> + <li><a href="/en-US/docs/Mozilla/Projects/NSPR/Reference/I_O_Types#Network_Address_Types">Network Address Types</a></li> + <li><a href="/en-US/docs/Mozilla/Projects/NSPR/Reference/I_O_Types#Types_Used_with_Socket_Options_Functions">Types Used with Socket Options Functions</a></li> + <li><a href="/en-US/docs/Mozilla/Projects/NSPR/Reference/I_O_Types#Type_Used_with_Memory-Mapped_I.2FO">Type Used with Memory-Mapped I/O</a></li> + <li><a href="/en-US/docs/Mozilla/Projects/NSPR/Reference/I_O_Types#Offset_Interpretation_for_Seek_Functions">Offset Interpretation for Seek Functions</a></li> + </ol> + </details> + </li> + <li class="toggle"> + <details><summary>I/O Functions</summary> + <ol> + <li><a href="/en-US/docs/Mozilla/Projects/NSPR/Reference/I_O_Functions#Functions_that_Operate_on_Pathnames">Functions that Operate on Pathnames</a></li> + <li><a href="/en-US/docs/Mozilla/Projects/NSPR/Reference/I_O_Functions#Functions_that_Act_on_File_Descriptors">Functions that Act on File Descriptors</a></li> + <li><a href="/en-US/docs/Mozilla/Projects/NSPR/Reference/I_O_Functions#Directory_I.2FO_Functions">Directory I/O Functions</a></li> + <li><a href="/en-US/docs/Mozilla/Projects/NSPR/Reference/I_O_Functions#Socket_Manipolation_Functions">Socket Manipolation Functions</a></li> + <li><a href="/en-US/docs/Mozilla/Projects/NSPR/Reference/I_O_Functions#Converting_Between_Host_and_Network_Addresses">Converting Between Host and Network Addresses</a></li> + <li><a href="/en-US/docs/Mozilla/Projects/NSPR/Reference/I_O_Functions#Memory-Mapped_I.2FO_Functions">Memory-Mapped I/O Functions</a></li> + <li><a href="/en-US/docs/Mozilla/Projects/NSPR/Reference/I_O_Functions#Anonymous_Pipe_Function">Anonymous Pipe Function</a></li> + <li><a href="/en-US/docs/Mozilla/Projects/NSPR/Reference/I_O_Functions#Polling_Functions">Polling Functions</a></li> + <li><a href="/en-US/docs/Mozilla/Projects/NSPR/Reference/I_O_Functions#Pollable_Events">Pollable Events</a></li> + <li><a href="/en-US/docs/Mozilla/Projects/NSPR/Reference/I_O_Functions#Manipulating_Layers">Manipulating Layers</a></li> + </ol> + </details> + </li> + <li class="toggle"> + <details><summary>Network Addresses</summary> + <ol> + <li><a href="/en-US/docs/Mozilla/Projects/NSPR/Reference/Network_Addresses#Network_Address_Types_and_Constants">Network Address Types and Constants</a></li> + <li><a href="/en-US/docs/Mozilla/Projects/NSPR/Reference/Network_Addresses#Network_Address_Functions">Network Address Functions</a></li> + </ol> + </details> + </li> + <li class="toggle"> + <details><summary>Atomic Operations</summary> + <ol> + <li><a href="/en-US/docs/Mozilla/Projects/NSPR/Reference/PR_AtomicIncrement">PR_AtomicIncrement</a></li> + <li><a href="/en-US/docs/Mozilla/Projects/NSPR/Reference/PR_AtomicDecrement">PR_AtomicDecrement</a></li> + <li><a href="/en-US/docs/Mozilla/Projects/NSPR/Reference/PR_AtomicSet">PR_AtomicSet</a></li> + </ol> + </details> + </li> + <li class="toggle"> + <details><summary>Interval Timing</summary> + <ol> + <li><a href="/en-US/docs/Mozilla/Projects/NSPR/Reference/Interval_Timing#Interval_Time_Type_and_Constants">Interval Time Type and Constants</a></li> + <li><a href="/en-US/docs/Mozilla/Projects/NSPR/Reference/Interval_Timing#Interval_Functions">Interval Functions</a></li> + </ol> + </details> + </li> + <li class="toggle"> + <details><summary>Date and Time</summary> + <ol> + <li><a href="/en-US/docs/Mozilla/Projects/NSPR/Reference/Date_and_Time#Types_and_Constants">Types and Constants</a></li> + <li><a href="/en-US/docs/Mozilla/Projects/NSPR/Reference/Date_and_Time#Time_Parameter_Callback_Functions">Time Parameter Callback Functions</a></li> + <li><a href="/en-US/docs/Mozilla/Projects/NSPR/Reference/Date_and_Time#Functions">Functions</a></li> + </ol> + </details> + </li> + <li class="toggle"> + <details open><summary>Memory Management Operations</summary> + <ol> + <li><a href="/en-US/docs/Mozilla/Projects/NSPR/Reference/Memory_Management_Operations#Memory_Allocation_Functions">Memory Allocation Functions</a></li> + <li><a href="/en-US/docs/Mozilla/Projects/NSPR/Reference/Memory_Management_Operations#Memory_Allocation_Macros">Memory Allocation Macros</a></li> + </ol> + </details> + </li> + <li class="toggle"> + <details><summary>String Operations</summary> + <ol> + <li><a href="/en-US/docs/Mozilla/Projects/NSPR/Reference/PL_strlen">PL_strlen</a></li> + <li><a href="/en-US/docs/Mozilla/Projects/NSPR/Reference/PL_strcpy">PL_strcpy</a></li> + <li><a href="/en-US/docs/Mozilla/Projects/NSPR/Reference/PL_strdup">PL_strdup</a></li> + <li><a href="/en-US/docs/Mozilla/Projects/NSPR/Reference/PL_strfree">PL_strfree</a></li> + </ol> + </details> + </li> + <li class="toggle"> + <details><summary>Floating Point Number to String Conversion</summary> + <ol> + <li><a href="/en-US/docs/Mozilla/Projects/NSPR/Reference/PR_strtod">PR_strtod</a></li> + <li><a href="/en-US/docs/Mozilla/Projects/NSPR/Reference/PR_dtoa">PR_dtoa</a></li> + <li><a href="/en-US/docs/Mozilla/Projects/NSPR/Reference/PR_cnvtf">PR_cnvtf</a></li> + </ol> + </details> + </li> + <li class="toggle"> + <details><summary>Linked Lists</summary> + <ol> + <li><a href="/en-US/docs/Mozilla/Projects/NSPR/Reference/Linked_Lists#Linked_List_Types">Linked List Types</a> + <ol> + <li><a href="/en-US/docs/Mozilla/Projects/NSPR/Reference/PRCList">PRCList</a></li> + </ol> + </li> + <li><a href="/en-US/docs/Mozilla/Projects/NSPR/Reference/Linked_Lists#Linked_List_Macros">Linked List Macros</a> + <ol> + <li><a href="/en-US/docs/Mozilla/Projects/NSPR/Reference/PR_INIT_CLIST">PR_INIT_CLIST</a></li> + <li><a href="/en-US/docs/Mozilla/Projects/NSPR/Reference/PR_INIT_STATIC_CLIST">PR_INIT_STATIC_CLIST</a></li> + <li><a href="/en-US/docs/Mozilla/Projects/NSPR/Reference/PR_APPEND_LINK">PR_APPEND_LINK</a></li> + <li><a href="/en-US/docs/Mozilla/Projects/NSPR/Reference/PR_INSERT_LINK">PR_INSERT_LINK</a></li> + <li><a href="/en-US/docs/Mozilla/Projects/NSPR/Reference/PR_NEXT_LINK">PR_NEXT_LINK</a></li> + <li><a href="/en-US/docs/Mozilla/Projects/NSPR/Reference/PR_PREV_LINK">PR_PREV_LINK</a></li> + <li><a href="/en-US/docs/Mozilla/Projects/NSPR/Reference/PR_REMOVE_LINK">PR_REMOVE_LINK</a></li> + <li><a href="/en-US/docs/Mozilla/Projects/NSPR/Reference/PR_REMOVE_AND_INIT_LINK">PR_REMOVE_AND_INIT_LINK</a></li> + <li><a href="/en-US/docs/Mozilla/Projects/NSPR/Reference/PR_INSERT_BEFORE">PR_INSERT_BEFORE</a></li> + <li><a href="/en-US/docs/Mozilla/Projects/NSPR/Reference/PR_INSERT_AFTER">PR_INSERT_AFTER</a></li> + </ol> + </li> + </ol> + </details> + </li> + <li class="toggle"> + <details><summary>Dynamic Library Linking</summary> + <ol> + <li><a href="/en-US/docs/Mozilla/Projects/NSPR/Reference/Dynamic_Library_Linking#Library_Linking_Types">Library Linking Types</a> + <ol> + <li><a href="/en-US/docs/Mozilla/Projects/NSPR/Reference/PRLibrary">PRLibrary</a></li> + <li><a href="/en-US/docs/Mozilla/Projects/NSPR/Reference/PRStaticLinkTable">PRStaticLinkTable</a></li> + </ol> + </li> + <li><a href="/en-US/docs/Mozilla/Projects/NSPR/Reference/Dynamic_Library_Linking#Library_Linking_Functions">Library Linking Functions</a> + <ol> + <li><a href="/en-US/docs/Mozilla/Projects/NSPR/Reference/PR_SetLibraryPath">PR_SetLibraryPath</a></li> + <li><a href="/en-US/docs/Mozilla/Projects/NSPR/Reference/PR_GetLibraryPath">PR_GetLibraryPath</a></li> + <li><a href="/en-US/docs/Mozilla/Projects/NSPR/Reference/PR_GetLibraryName">PR_GetLibraryName</a></li> + <li><a href="/en-US/docs/Mozilla/Projects/NSPR/Reference/PR_FreeLibraryName">PR_FreeLibraryName</a></li> + <li><a href="/en-US/docs/Mozilla/Projects/NSPR/Reference/PR_LoadLibrary">PR_LoadLibrary</a></li> + <li><a href="/en-US/docs/Mozilla/Projects/NSPR/Reference/PR_UnloadLibrary">PR_UnloadLibrary</a></li> + <li><a href="/en-US/docs/Mozilla/Projects/NSPR/Reference/PR_FindSymbol">PR_FindSymbol</a></li> + <li><a href="/en-US/docs/Mozilla/Projects/NSPR/Reference/PR_FindSymbolAndLibrary">PR_FindSymbolAndLibrary</a></li> + <li><a href="/en-US/docs/Mozilla/Projects/NSPR/Reference/Dynamic_Library_Linking#Finding_Symbols_Defined_in_the_Main_Executable_Program">Finding Symbols Defined in the Main Executable Program</a></li> + </ol> + </li> + <li><a href="/en-US/docs/Mozilla/Projects/NSPR/Reference/Dynamic_Library_Linking#Platform_Notes">Platform Notes</a> + <ol> + <li><a href="/en-US/docs/Mozilla/Projects/NSPR/Reference/Dynamic_Library_Linking#Dynamic_Library_Search_Path">Dynamic Library Search Path</a></li> + <li><a href="/en-US/docs/Mozilla/Projects/NSPR/Reference/Dynamic_Library_Linking#Exporting_Symbols_from_the_Main_Executable_Program">Exporting Symbols from the Main Executable Program</a></li> + </ol> + </li> + </ol> + </details> + </li> + <li class="toggle"> + <details><summary>Process Management and Interprocess Communication</summary> + <ol> + <li><a href="/en-US/docs/Mozilla/Projects/NSPR/Reference/Process_Management_and_Interprocess_Communication#Process_Management_Types_and_Constants">Process Management Types and Constants</a> + <ol> + <li><a href="/en-US/docs/Mozilla/Projects/NSPR/Reference/PRProcess">PRProcess</a></li> + <li><a href="/en-US/docs/Mozilla/Projects/NSPR/Reference/PRProcessAttr">PRProcessAttr</a></li> + </ol> + </li> + <li><a href="/en-US/en-US/docs/Mozilla/Projects/NSPR/Reference/Process_Management_and_Interprocess_Communication#Process_Management_Functions">Process Management Functions</a> + <ol> + <li><a href="/en-US/docs/Mozilla/Projects/NSPR/Reference/Process_Management_and_Interprocess_Communication#Setting_the_Attributes_of_a_New_Process">Setting the Attributes of a New Process</a></li> + <li><a href="/en-US/docs/Mozilla/Projects/NSPR/Reference/Process_Management_and_Interprocess_Communication#Creating_and_Managing_Processes">Creating and Managing Processes</a></li> + </ol> + </li> + </ol> + </details> + </li> + <li class="toggle"> + <details><summary>Logging</summary> + <ol> + <li><a href="/en-US/docs/Mozilla/Projects/NSPR/Reference/Logging#Conditional_Compilation_and_Execution">Conditional Compilation and Execution</a></li> + <li><a href="/en-US/docs/Mozilla/Projects/NSPR/Reference/Logging#Log_Types_and_Variables">Log Types and Variables</a> + <ol> + <li><a href="/en-US/docs/Mozilla/Projects/NSPR/Reference/PRLogModoleInfo">PRLogModoleInfo</a></li> + <li><a href="/en-US/docs/Mozilla/Projects/NSPR/Reference/PRLogModoleLevel">PRLogModoleLevel</a></li> + <li><a href="/en-US/docs/Mozilla/Projects/NSPR/Reference/NSPR_LOG_MODULES">NSPR_LOG_MODULES</a></li> + <li><a href="/en-US/docs/Mozilla/Projects/NSPR/Reference/NSPR_LOG_FILE">NSPR_LOG_FILE</a></li> + </ol> + </li> + <li><a href="/en-US/docs/Mozilla/Projects/NSPR/Reference/Logging#Logging_Functions_and_Macros">Logging Functions and Macros</a> + <ol> + <li><a href="/en-US/docs/Mozilla/Projects/NSPR/Reference/PR_NewLogModole">PR_NewLogModole</a></li> + <li><a href="/en-US/docs/Mozilla/Projects/NSPR/Reference/PR_SetLogFile">PR_SetLogFile</a></li> + <li><a href="/en-US/docs/Mozilla/Projects/NSPR/Reference/PR_SetLogBuffering">PR_SetLogBuffering</a>/li></li> + <li><a href="/en-US/docs/Mozilla/Projects/NSPR/Reference/PR_LogPrint">PR_LogPrint</a></li> + <li><a href="/en-US/docs/Mozilla/Projects/NSPR/Reference/PR_LogFlush">PR_LogFlush</a></li> + <li><a href="/en-US/docs/Mozilla/Projects/NSPR/Reference/PR_LOG_TEST">PR_LOG_TEST</a></li> + <li><a href="/en-US/docs/Mozilla/Projects/NSPR/Reference/PR_LOG">PR_LOG</a></li> + <li><a href="/en-US/docs/Mozilla/Projects/NSPR/Reference/PR_Assert_">PR_Assert</a></li> + <li><a href="/en-US/docs/Mozilla/Projects/NSPR/Reference/PR_ASSERT">PR_ASSERT</a></li> + <li><a href="/en-US/docs/Mozilla/Projects/NSPR/Reference/PR_NOT_REACHED">PR_NOT_REACHED</a></li> + </ol> + </li> + <li><a href="/en-US/docs/Mozilla/Projects/NSPR/Reference/Logging#Use_Example">Use Example</a></li> + </ol> + </details> + </li> + <li class="toggle"> + <details><summary>Named Shared Memory</summary> + <ol> + <li><a href="/en-US/docs/Mozilla/Projects/NSPR/Reference/Named_Shared_Memory#Shared_Memory_Protocol">Shared Memory Protocol</a></li> + <li><a href="/en-US/docs/Mozilla/Projects/NSPR/Reference/Named_Shared_Memory#Named_Shared_Memory_Functions">Named Shared Memory Functions</a></li> + </ol> + </details> + </li> + <li class="toggle"> + <details><summary>Anonymous Shared Memory</summary> + <ol> + <li><a href="/en-US/docs/Mozilla/Projects/NSPR/Reference/Anonymous_Shared_Memory#Anonymous_Memory_Protocol">Anonymous Memory Protocol</a></li> + <li><a href="/en-US/docs/Mozilla/Projects/NSPR/Reference/Anonymous_Shared_Memory#Anonymous_Shared_Memory_Functions">Anonymous Shared Memory Functions</a></li> + </ol> + </details> + </li> + <li class="toggle"> + <details><summary>IPC Semaphores</summary> + <ol> + <li><a href="/en-US/docs/Mozilla/Projects/NSPR/Reference/IPC_Semaphores#IPC_Semaphore_Functions">IPC Semaphore Functions</a></li> + </ol> + </details> + </li> + <li class="toggle"> + <details><summary>Thread Pools</summary> + <ol> + <li><a href="/en-US/docs/Mozilla/Projects/NSPR/Reference/Thread_Pools#Thread_Pool_Types">Thread Pool Types</a></li> + <li><a href="/en-US/docs/Mozilla/Projects/NSPR/Reference/Thread_Pools#Thread_Pool_Functions">Thread Pool Functions</a></li> + </ol> + </details> + </li> + <li class="toggle"> + <details><summary>Random Number Generator</summary> + <ol> + <li><a href="/en-US/docs/Mozilla/Projects/NSPR/Reference/Random_Number_Generator#Random_Number_Generator_Function">Random Number Generator Function</a></li> + </ol> + </details> + </li> + <li class="toggle"> + <details><summary>Hash Tables</summary> + <ol> + <li><a href="/en-US/docs/Mozilla/Projects/NSPR/Reference/Hash_Tables#Hash_Tables_and_Type_Constants">Hash Tables and Type Constants</a></li> + <li><a href="/en-US/docs/Mozilla/Projects/NSPR/Reference/Hash_Tables#Hash_Table_Functions">Hash Table Functions</a></li> + </ol> + </details> + </li> + <li class="toggle"> + <details><summary>NSPR Error Handling</summary> + <ol> + <li><a href="/en-US/docs/Mozilla/Projects/NSPR/Reference/NSPR_Error_Handling#Error_Type">Error Type</a></li> + <li><a href="/en-US/docs/Mozilla/Projects/NSPR/Reference/NSPR_Error_Handling#Error_Functions">Error Functions</a></li> + <li><a href="/en-US/docs/Mozilla/Projects/NSPR/Reference/NSPR_Error_Handling#Error_Codes">Error Codes</a></li> + </ol> + </details> + </li> + <li class="toggle"> + <details><summary>Contribute</summary> + <ol> + <li></li> + <li><a href="/en-US/docs/MDN">The MDN Project</a></li> + </ol> + </details> + </li> +</ol> +</section> + +<p>本章介绍用于执行内存管理的全局函数和宏。NSPR 提供基于堆内存管理的函数,映射到熟悉的<code>malloc()</code>, <code>calloc()</code>, <code>realloc()</code>, 和 <code>free()</code>.</p> + +<ul> + <li><a href="#Memory_Allocation_Functions">Memory Allocation Functions</a></li> + <li><a href="#Memory_Allocation_Macros">Memory Allocation Macros</a></li> +</ul> + +<h2 id="Memory_Allocation_Functions" name="Memory_Allocation_Functions">内存分配函数</h2> + +<p>NSPR has its own heap, and these functions act on that heap. Libraries built on top of NSPR, such as the Netscape security libraries, use these functions to allocate and free memory. If you are allocating memory for use by such libraries or freeing memory that was allocated by such libraries, you must use these NSPR functions rather than the libc equivalents.</p> + +<p>Memory allocation functions are:</p> + +<ul> + <li><code><a href="PR_Malloc">PR_Malloc</a></code></li> + <li><code><a href="PR_Calloc">PR_Calloc</a></code></li> + <li><code><a href="PR_Realloc">PR_Realloc</a></code></li> + <li><code><a href="PR_Free">PR_Free</a></code></li> +</ul> + +<p><code>PR_Malloc()</code>, <code>PR_Calloc()</code>, <code>PR_Realloc()</code>, and <code>PR_Free()</code> have the same signatures as their libc equivalents <code>malloc()</code>, <code>calloc()</code>, <code>realloc()</code>, and <code>free()</code>, and have the same semantics. (Note that the argument type <code>size_t</code> is replaced by <code>PRUint32</code>.) Memory allocated by <code>PR_Malloc()</code>, <code>PR_Calloc()</code>, or <code>PR_Realloc()</code> must be freed by <code>PR_Free()</code>.</p> + +<h2 id="Memory_Allocation_Macros" name="Memory_Allocation_Macros">内存分配 Macros</h2> + +<p>Macro versions of the memory allocation functions are available, as well as additional macros that provide programming convenience:</p> + +<ul> + <li><code><a href="PR_MALLOC">PR_MALLOC</a></code></li> + <li><code><a href="PR_NEW">PR_NEW</a></code></li> + <li><code><a href="PR_REALLOC">PR_REALLOC</a></code></li> + <li><code><a href="PR_CALLOC">PR_CALLOC</a></code></li> + <li><code><a href="PR_NEWZAP">PR_NEWZAP</a></code></li> + <li><code><a href="PR_DELETE">PR_DELETE</a></code></li> + <li><code><a href="PR_FREEIF">PR_FREEIF</a></code></li> +</ul> |
