Results for: "minmax"

Calculates the logarithmic gamma of x and the sign of gamma of x.

Math.lgamma(x) is same as

[Math.log(Math.gamma(x).abs), Math.gamma(x) < 0 ? -1 : 1]

but avoid overflow by Math.gamma(x) for large x.

Math.lgamma(0) #=> [Infinity, 1]

Gets the resource limit of the process. cur_limit means current (soft) limit and max_limit means maximum (hard) limit.

resource indicates the kind of resource to limit. It is specified as a symbol such as :CORE, a string such as "CORE" or a constant such as Process::RLIMIT_CORE. See Process.setrlimit for details.

cur_limit and max_limit may be Process::RLIM_INFINITY, Process::RLIM_SAVED_MAX or Process::RLIM_SAVED_CUR. See Process.setrlimit and the system getrlimit(2) manual for details.

Sets the resource limit of the process. cur_limit means current (soft) limit and max_limit means maximum (hard) limit.

If max_limit is not given, cur_limit is used.

resource indicates the kind of resource to limit. It should be a symbol such as :CORE, a string such as "CORE" or a constant such as Process::RLIMIT_CORE. The available resources are OS dependent. Ruby may support following resources.

AS

total available memory (bytes) (SUSv3, NetBSD, FreeBSD, OpenBSD but 4.4BSD-Lite)

CORE

core size (bytes) (SUSv3)

CPU

CPU time (seconds) (SUSv3)

DATA

data segment (bytes) (SUSv3)

FSIZE

file size (bytes) (SUSv3)

MEMLOCK

total size for mlock(2) (bytes) (4.4BSD, GNU/Linux)

MSGQUEUE

allocation for POSIX message queues (bytes) (GNU/Linux)

NICE

ceiling on process’s nice(2) value (number) (GNU/Linux)

NOFILE

file descriptors (number) (SUSv3)

NPROC

number of processes for the user (number) (4.4BSD, GNU/Linux)

RSS

resident memory size (bytes) (4.2BSD, GNU/Linux)

RTPRIO

ceiling on the process’s real-time priority (number) (GNU/Linux)

RTTIME

CPU time for real-time process (us) (GNU/Linux)

SBSIZE

all socket buffers (bytes) (NetBSD, FreeBSD)

SIGPENDING

number of queued signals allowed (signals) (GNU/Linux)

STACK

stack size (bytes) (SUSv3)

cur_limit and max_limit may be :INFINITY, "INFINITY" or Process::RLIM_INFINITY, which means that the resource is not limited. They may be Process::RLIM_SAVED_MAX, Process::RLIM_SAVED_CUR and corresponding symbols and strings too. See system setrlimit(2) manual for details.

The following example raises the soft limit of core size to the hard limit to try to make core dump possible.

Process.setrlimit(:CORE, Process.getrlimit(:CORE)[1])

Initializes the supplemental group access list by reading the system group database and using all groups of which the given user is a member. The group with the specified gid is also added to the list. Returns the resulting Array of the gids of all the groups in the supplementary group access list. Not available on all platforms.

Process.groups   #=> [0, 1, 2, 3, 4, 6, 10, 11, 20, 26, 27]
Process.initgroups( "mgranger", 30 )   #=> [30, 6, 10, 11]
Process.groups   #=> [30, 6, 10, 11]
No documentation available
No documentation available

Return the best specification that contains the file matching path amongst the specs that are not activated.

Search through all unresolved deps and sub-dependencies and return specs that contain the file matching path.

No documentation available
No documentation available

Find cached filename in Gem.path. Returns nil if the file cannot be found.

No documentation available
No documentation available
No documentation available
No documentation available
No documentation available
No documentation available

Rewinds the enumerator chain by calling the “rewind” method on each enumerable in reverse order. Each call is performed only if the enumerable responds to the method.

Returns a printable version of the enumerator chain.

Returns the number that defines the first element of this arithmetic sequence.

Convert this arithmetic sequence to a printable form.

Allocates a C struct with the types provided.

When the instance is garbage collected, the C function func is called.

Allocates a C union the types provided.

When the instance is garbage collected, the C function func is called.

Fiddle::Pointer.malloc(size, freefunc = nil)  => fiddle pointer instance

Allocate size bytes of memory and associate it with an optional freefunc that will be called when the pointer is garbage collected.

freefunc must be an address pointing to a function or an instance of Fiddle::Function

Returns a string formatted with an easily readable representation of the internal state of the pointer.

Search took: 5ms  ·  Total Results: 1972