Edge Rewrite
// HTMLRewriter · presentation

This page was redesigned at the edge.

Cloudflare fetched the original article and streamed it through HTMLRewriter to apply an entirely new visual system without rebuilding the source page.

// request.cf · coarse context

A page that knows where it met you.

Only coarse request metadata is shown. This demo does not display or persist visitor IP addresses.

Country
US
Cloudflare location
CMH
Connection
HTTP/2
Language
Not provided

Ray ID: a21a95ee2b0e1ef0

Jump to content

// Workers AI · dad joke modeWhy did Netscape Portable Runtime go to therapy? It had a lot of "net" results to work through.

From Wikipedia, the free encyclopedia
Netscape Portable Runtime
DeveloperMozilla Foundation / Mozilla Corporation
Stable release
4.39[1] Edit this on Wikidata / 5 May 2026; 2 months ago (5 May 2026)
Written inC
Operating systemCross-platform
TypeSoftware library
LicenseMPL
Websitefirefox-source-docs.mozilla.org/nspr/index.html
Repository

The Netscape Portable Runtime, or NSPR, is a cross-platform abstraction layer library for the C programming language. It provides a uniform API for various operating system functions.[2]

History

[edit]

NSPR was originally designed to provide a base for the Java virtual machine in Netscape 5. Over time, it was extended to allow support for additional functionality used for Netscape's server and client software.[3] NSPR continues to be used today by Firefox as well as many of Oracle and Red Hat's server products.[2]

Features

[edit]

Threads

[edit]

NSPR provides a thread API. It uses the OS's threading capabilities where possible. It also provides support for sharing memory between threads, as well as creating and using thread pools. Locks, atomics, semaphores, and both cached and uncached monitors are provided.[4]

I/O

[edit]

NSPR provides functions for working with files, directories, anonymous pipes and network sockets.[4]

Network addresses

[edit]

NSPR defines an IP-centric network address object. Functions are provided to translate ASCII strings (DNS names) into NSPR's network address structures, regardless of whether the addressing technology uses IPv4 or IPv6.[3][4]

Time

[edit]

NSPR makes timing facilities available in two forms: interval timing and calendar functions.

Interval timers are based on a free-running 32-bit resolution timer. Their epoch and interval can be set as needed.

Calendar times are represented using 64-bit signed Unix time. NSPR provides functions for manipulating and converting timestamps.[3][4]

Memory management

[edit]

NSPR provides API to perform the basic malloc, calloc, realloc and free functions. Depending on the platform, the functions may be implemented almost entirely in the NSPR runtime or simply shims that call immediately into the host operating system's offerings.[3][4]

Linking

[edit]

Support for linking (shared library loading and unloading) forms part of NSPR's feature set. In most cases, this is simply a smoothing over of the facilities offered by the various platform providers.[3][4]

Data structures

[edit]

NSPR provides implementations of a circular linked list and a hash table.[4]

See also

[edit]

References

[edit]
  1. Kai Engert. "[ANNOUNCE] NSPR 4.39 Release". Retrieved 6 May 2026.
  2. 1 2 "NSPR". Firefox Source Docs. Mozilla. Retrieved 2024-01-27.
  3. 1 2 3 4 5 Larry H. "About NSPR". Firefox Source Docs. Mozilla. Retrieved 2024-01-27.
  4. 1 2 3 4 5 6 7 "NSPR API Reference". Firefox Source Docs. Mozilla. Retrieved 2024-01-27.
[edit]