| Skip Navigation Links | |
| Exit Print View | |
![]() | man pages section 3: Basic Library Functions Oracle Solaris 11 Information Library |
enable_extended_FILE_stdio(3C)
posix_spawnattr_getschedparam(3C)
posix_spawnattr_getschedpolicy(3C)
posix_spawnattr_getsigdefault(3C)
posix_spawnattr_getsigignore_np(3C)
posix_spawnattr_getsigmask(3C)
posix_spawnattr_setschedparam(3C)
posix_spawnattr_setschedpolicy(3C)
posix_spawnattr_setsigdefault(3C)
posix_spawnattr_setsigignore_np(3C)
posix_spawnattr_setsigmask(3C)
posix_spawn_file_actions_addclose(3C)
posix_spawn_file_actions_addclosefrom_np(3C)
posix_spawn_file_actions_adddup2(3C)
posix_spawn_file_actions_addopen(3C)
posix_spawn_file_actions_destroy(3C)
posix_spawn_file_actions_init(3C)
pthread_attr_getdetachstate(3C)
pthread_attr_getinheritsched(3C)
pthread_attr_getschedparam(3C)
pthread_attr_getschedpolicy(3C)
pthread_attr_setdetachstate(3C)
pthread_attr_setinheritsched(3C)
pthread_attr_setschedparam(3C)
pthread_attr_setschedpolicy(3C)
pthread_barrierattr_destroy(3C)
pthread_barrierattr_getpshared(3C)
pthread_barrierattr_setpshared(3C)
pthread_condattr_getpshared(3C)
pthread_condattr_setpshared(3C)
pthread_cond_reltimedwait_np(3C)
pthread_key_create_once_np(3C)
pthread_mutexattr_getprioceiling(3C)
pthread_mutexattr_getprotocol(3C)
pthread_mutexattr_getpshared(3C)
pthread_mutexattr_getrobust(3C)
pthread_mutexattr_setprioceiling(3C)
pthread_mutexattr_setprotocol(3C)
pthread_mutexattr_setpshared(3C)
pthread_mutexattr_setrobust(3C)
pthread_mutex_getprioceiling(3C)
pthread_mutex_reltimedlock_np(3C)
pthread_mutex_setprioceiling(3C)
pthread_rwlockattr_destroy(3C)
pthread_rwlockattr_getpshared(3C)
pthread_rwlockattr_setpshared(3C)
pthread_rwlock_reltimedrdlock_np(3C)
pthread_rwlock_reltimedwrlock_np(3C)
pthread_rwlock_timedrdlock(3C)
pthread_rwlock_timedwrlock(3C)
rctlblk_get_enforced_value(3C)
- memory operations
#include <string.h>void *memccpy(void *restricts1,const void *restricts2,intc,size_tn);
void *memchr(const void *s,intc,size_tn);
intmemcmp(const void *s1,const void *s2,size_tn);
void *memcpy(void *restricts1,const void *restricts2,size_tn);
void *memmove(void *s1,const void *s2,size_tn);
void *memset(void *s,intc,size_tn);
void *memmem(const void *haystack, size_thaystacklen, const void *needle, size_tneedlelen);
#include <string.h>const void *memchr(const void *s,intc,size_tn);
#include <cstring>void *std::memchr(void *s,intc,size_tn);
These functions operate as efficiently as possible on memory areas (arrays ofbytes bounded by a count, not terminated by a null character). Theydo not check for the overflow of any receiving memory area.
Thememccpy() function copies bytes from memory areas2 intos1, stoppingafter the first occurrence ofc (converted to anunsigned char) has beencopied, or aftern bytes have been copied, whichever comes first. It returnsa pointer to the byte after the copy ofc ins1,or a null pointer ifc was not found in the firstn bytes ofs2.
Thememchr() function returns a pointer to the first occurrence ofc(converted to anunsigned char) in the firstn bytes (each interpreted asanunsigned char) of memory areas, or a null pointer ifc doesnot occur.
Thememcmp() function compares its arguments, looking at the firstn bytes(each interpreted as anunsigned char), and returns an integer less than, equalto, or greater than 0, according ass1 is lexicographically less than, equalto, or greater thans2 when taken to be unsigned characters.
Thememcpy() function copiesn bytes from memory areas2 tos1.It returnss1. If copying takes place between objects that overlap, thebehavior is undefined.
Thememmove() function copiesn bytes from memory areas2 to memoryareas1. Copying between objects that overlap will take place correctly. Itreturnss1.
Thememset() function sets the firstn bytes in memory areasto the value ofc (converted to anunsigned char). It returnss.
Thememmem() function locates the start of the first occurrence of thesubstringneedle of lengthneedlelen in the memory areahaystack of lengthhaystacklen. It returns a pointer to the start of the substring, orNULLif the substring is not found.
Usingmemcpy() might be faster than usingmemmove() if the application knowsthat the objects being copied do not overlap.
Seeattributes(5) for descriptions of the following attributes:
|
string(3C),attributes(5),standards(5)
Overlap between objects being copied can arise even when their (virtual) addressranges appear to be disjoint; for example, as a result of memory-mappingoverlapping portions of the same underlying file, or of attaching the sameshared memory segment more than once.
Copyright © 2011, Oracle and/or its affiliates. All rights reserved.Legal Notices | ![]() ![]() |