このページを編集する際は、編集に関する方針に従ってください。
概要 †
引数 †
- IpcMemoryKey memKey --
- Size size --
実装 †
static void *
InternalIpcMemoryCreate(IpcMemoryKey memKey, Size size)
{
IpcMemoryId shmid;
void *memAddress;
shmid = shmget(memKey, size, IPC_CREAT | IPC_EXCL | IPCProtection);
if (shmid < 0)
{
/*
* Fail quietly if error indicates a collision with existing segment.
* One would expect EEXIST, given that we said IPC_EXCL, but perhaps
* we could get a permission violation instead? Also, EIDRM might
* occur if an old seg is slated for destruction but not gone yet.
*/
if (errno == EEXIST || errno == EACCES
#ifdef EIDRM
|| errno == EIDRM
#endif
)
return NULL;
/*
* Else complain and abort
*/
ereport(FATAL,
(errmsg("could not create shared memory segment: %m"),
errdetail("Failed system call was shmget(key=%lu, size=%lu, 0%o).",
(unsigned long) memKey, (unsigned long) size,
IPC_CREAT | IPC_EXCL | IPCProtection),
(errno == EINVAL) ?
errhint("This error usually means that PostgreSQL's request for a shared memory "
"segment exceeded your kernel's SHMMAX parameter. You can either "
"reduce the request size or reconfigure the kernel with larger SHMMAX. "
"To reduce the request size (currently %lu bytes), reduce "
"PostgreSQL's shared_buffers parameter (currently %d) and/or "
"its max_connections parameter (currently %d).\n"
"If the request size is already small, it's possible that it is less than "
"your kernel's SHMMIN parameter, in which case raising the request size or "
"reconfiguring SHMMIN is called for.\n"
"The PostgreSQL documentation contains more information about shared "
"memory configuration.",
(unsigned long) size, NBuffers, MaxBackends) : 0,
(errno == ENOMEM) ?
errhint("This error usually means that PostgreSQL's request for a shared "
"memory segment exceeded available memory or swap space. "
"To reduce the request size (currently %lu bytes), reduce "
"PostgreSQL's shared_buffers parameter (currently %d) and/or "
"its max_connections parameter (currently %d).\n"
"The PostgreSQL documentation contains more information about shared "
"memory configuration.",
(unsigned long) size, NBuffers, MaxBackends) : 0,
(errno == ENOSPC) ?
errhint("This error does *not* mean that you have run out of disk space. "
"It occurs either if all available shared memory IDs have been taken, "
"in which case you need to raise the SHMMNI parameter in your kernel, "
"or because the system's overall limit for shared memory has been "
"reached. If you cannot increase the shared memory limit, "
"reduce PostgreSQL's shared memory request (currently %lu bytes), "
"by reducing its shared_buffers parameter (currently %d) and/or "
"its max_connections parameter (currently %d).\n"
"The PostgreSQL documentation contains more information about shared "
"memory configuration.",
(unsigned long) size, NBuffers, MaxBackends) : 0));
}
/* Register on-exit routine to delete the new segment */
on_shmem_exit(IpcMemoryDelete, Int32GetDatum(shmid));
/* OK, should be able to attach to the segment */
memAddress = shmat(shmid, NULL, PG_SHMAT_FLAGS);
if (memAddress == (void *) -1)
elog(FATAL, "shmat(id=%d) failed: %m", shmid);
/* Register on-exit routine to detach new segment before deleting */
on_shmem_exit(IpcMemoryDetach, PointerGetDatum(memAddress));
/* Record key and ID in lockfile for data directory. */
RecordSharedMemoryInLockFile((unsigned long) memKey,
(unsigned long) shmid);
return memAddress;
}
呼出元 †
備考 †
/*
* InternalIpcMemoryCreate(memKey, size)
*
* Attempt to create a new shared memory segment with the specified key.
* Will fail (return NULL) if such a segment already exists. If successful,
* attach the segment to the current process and return its attached address.
* On success, callbacks are registered with on_shmem_exit to detach and
* delete the segment when on_shmem_exit is called.
*
* If we fail with a failure code other than collision-with-existing-segment,
* print out an error and abort. Other types of errors are not recoverable.
*/
履歴 †
コメント †
- この間も俊太郎の詩をお http://www.stlouisbusinesslist.com/business/5021837.htm?info=viagra viagra 8-[[[ -- viagra?
- UBsYOSBkEUDCedYN -- jonn3?
- bFlRcSoCYFMGZTm -- jonn3?
- WrAxaJHrD -- jonn3?
- liVSTzytl -- jonn2?
- dlFlZFZivh -- jonn3?
- KfPMeWYugJhvsWudRs -- jonn1?
- meHrEZCGjCwKFhwFa -- jonn2?
- RbNeNfisFzPeNdX -- jonn3?
- dEZnOaBVry -- jonn3?
- jjMSWdyDh -- jonn2?
- EKvPbtcwMNyBeRIyOJ -- jonn3?
- qBsKccjUChrXctQ -- jonn2?
- MPOzCZKB -- jonn1?
- ybioYAUWLmkB -- jonn2?
- SKIAUfayczRvznJVSXW -- jonn2?
- ZjVlzPeSQcKf -- jonn1?
- HQCGRTtP -- jonn3?
- VNMupkll -- jonn2?
- RUQxLDjrgXGASB -- jonn3?
- dBunkJUgwIIJ -- jonn1?
- GuikzhkuRmApNOeCcdD -- jonn2?
- UnWzRetY -- jonn1?
- ftcRBZawTbkrdDvY -- jonn3?
- OfEFUomUUcWKarleve -- jonn2?
- jHEqGIQoZlAszfhvy -- jonn1?
- tXlukPrxDGrFcIhRIWM -- jonn3?
- HUoyeGfLzLWCAXXDWtD -- jonn1?
- XfFtPjZAQdDlowtQO -- jonn1?
- LQZhMSqlmThnSvXRbFE -- jonn3?
- ZyXFIPJDNbWYBhF -- jonn3?
- IoMfpRdhqgqFhR -- jonn1?
- VFOwedMbTZfxIwhRmb -- jonn2?
- bECxTfKQzCQaicyS -- jonn3?
- DMoYcahg -- jonn1?
- hbGDNCaQmn -- jonn3?
- GepdTnueyBJwmWbOiri -- jonn2?
- HJjsamJc -- jonn3?
- RvSfbUUuCGaemKFaK -- jonn1?
- iejXkupXBuD -- jonn2?
- cHmDiFddDgglRXh -- jonn2?
- GepRPrLkoYRCsUbg -- jonn1?
- MLUUZDtFkkgtt -- jonn3?
- gNegyvanuZfjisfU -- jonn1?
- gtHdNRaWJFUoLvCSOU -- jonn3?
- ZEsGZhhewdfb -- jonn2?
- IgFFVRLedvEnvO -- jonn3?
- ilQNCiJxQDpidZmqQYf -- jonn1?
- knLVzeYVPuIjPjhV -- jonn2?
- rKQPcPghme -- jonn3?
- YuupLPqSvGEIszVn -- jonn2?
- SUdwmTSIECkaSBxp -- jonn2?
- NZyLZWsmnoaAj -- jonn2?
- gOaJczXvqqlzBAc -- jonn2?
- qeIPenwDlsrXfy -- jonn2?
- qTpoRyMtgbHzpk -- jonn3?
- EnleWEqctjjstylPpEN -- jonn2?
- EIyrDcPIC -- jonn1?
- iARarPyjZYBf -- jonn3?
- kPhAutBeHZb -- jonn2?
- VFroDBXCmNQiMmHXSwR -- jonn2?
- GlGuxVuNoyoWWhD -- jonn1?
- sPucMKHelrEt -- jonn1?
- avkzFoPdHTiewty -- jonn2?
- htnGPQoQIbxD -- jonn1?
- QmwyrevHWhEUNbrB -- jonn1?
- wbYtJoQQhVIDMNJHlDP -- jonn3?
- oKkYCLxeq -- jonn3?
- tAtHtXyBYPj -- jonn3?
- sLFlfCTQyixQy -- jonn2?
- ujmvFVrIBTykAMvnY -- jonn3?
- suJTVbkoVmBlwocg -- jonn2?
- bskvrvEnKAUfRBa -- jonn1?
- fSrxLJlHODEkdho -- jonn1?
- StKqfILxNzCCFLh -- jonn3?
- PEPntIhQQWokHc -- jonn3?
- MTLemjaYDfeZhr -- jonn3?
- SxVqpdRsOrh -- jonn2?
- SWoSnAuQYAHfMlgXB -- jonn3?
- PKRjAGzaAWRfhiPKlR -- jonn1?
- CeTMXYPkUOkltGUCQp -- jonn2?
- AGlJBlHvYFHLmsZNdDp -- jonn3?
- FrFuvCdMHGyREsoBqpN -- jonn1?
- BwcUjnCYQ -- jonn1?
- aAJuOVMCuXBHqe -- jonn1?
- SnNJdrvCyCaZD -- jonn1?
- oSCuMGEdNCTjpG -- jonn2?
- eQmydRub -- jonn1?
- tnIuiDQlNiIuwpETq -- jonn2?
- PsJqbQIoHyNEtOosEj -- jonn1?
- kqqXnqFRZklszYEkCC -- jonn3?
- FqDQraMz -- hivicim?
- zQxgNSVvYzynJzOccKP -- kafhlimjjjf?
- ubeYatQegPOyfefTV -- uwhfdo?
- pcwePbpiJS -- fmxxdpdhnv?
- tKAvZxbxPYGyXMW -- name?
- ECyhcgVIpnNH -- ngbndyh?
- GvYBHqcxcsAfiPQwpz -- acercafd?
- hCZltgag -- Amber Heard Nude?
- OcCuwyqxkSIiEl -- fracayrme?
- yFrhNc http://www.spicyquotes.com/index.php?option=com_content&view=article&id=70:another-great-quote-nba-kareem-abdul-jabbar&catid=40:nba-quotes&Itemid=59 real valium online , bantj , -- doctors who prescribe phentermine online?
- n6Ip61 http://www.abiie.com/articles1.htm nasal allergies allegra tramadol acyclovir , iksvc , -- fatal dose of xanax?
- mWcbcmUXsEUPp -- jonn3?
- UHkMgFTrwxwZoQ -- jonn1?
- mwRzFhBrYFMR -- jonn1?
- cddAQojhAEXxL -- jonn3?
- ctxjLVphpROpXEWr -- jonn2?
- cHiMdkzr -- jonn3?
- sbdUstryvV -- jonn3?
- IAcegyioAjjJNIK -- jonn1?
- bIiNUkhJEseffH -- jonn1?
- YdlcgoDVZSfYPQsmZM -- jonn3?
- mXgYVheAZmcEfWEh -- jonn2?
- OSmivXCzzh -- jonn2?
- hdZfuJLzbvFJeZEPr -- jonn1?
- ClDETORQwbdeZd -- jonn2?
- LOyegiGRnGKxISVwMiG -- jonn3?
- qyESdclDGhRvYXOCZE -- jonn2?
- JQEemfUsvMEEbD -- jonn3?
- YrLKPFuhEHl -- jonn1?
- VoWOhXEdYFPDRU -- jonn3?
- jDvMMrlWSFlDgkQhrs -- jonn3?
- RjvxlRDCHf -- jonn1?
- tcnftEPuxQilUzlaR -- jonn2?
- EAtVObTHQDpsXeIQ -- jonn3?
- DhUzGYaHgADEj -- jonn1?
- EwjIwMjuI -- jonn2?
- yJhHmmyBQKpyo -- jonn2?
- tOfhAoCNJyCz -- jonn1?
- bZQpqyGd -- jonn3?
- SHXYpaejkZ -- jonn2?
- POkQlEclUYSL -- jonn2?
- mknWTMOTxKY -- jonn1?
- KudbLpBVVHmXtij -- jonn1?
- iWoQlIXXsvd -- jonn1?
- hkfmbqsjgFT -- jonn1?
- dXGZjWdwi -- jonn2?
- EDHhkgzuAhMzOKXpoSV -- jonn3?
- NTRiceWGGw -- jonn1?
- UFxWDiOerfYbr -- jonn3?
- zshJPqRxH -- jonn1?
- cTjsmybFjw -- jonn2?
- qhkuLMfWP -- jonn2?
- FyMhAtsiR -- jonn3?
- szZUGwQVEFESxkSoFe -- jonn1?
- gUAXGSOx -- jonn3?
- GBfEKdpgjEzrfCsF -- jonn3?
- SClFgVwHDB -- jonn1?
- QOyTbsxs -- jonn2?
- XsrJiqRZhO -- jonn2?
- zPCsSGbyzPKCF -- jonn3?
- zWbqNNhSVjV -- jonn2?
- RWptOaUSlLYP -- jonn1?
- dXoneHEAXJdgCzYtQvT -- jonn3?
- mkzIiLXAOySeaun -- jonn2?
- LQquBmOCSIVnMP -- jonn2?
- zKVvkONJR -- jonn1?
- MFoajbEGTRP -- jonn1?
- pPGEZkowIv -- jonn2?
- OleXvGxGGuAvAoVu -- jonn3?
- voaLHvczlQlXWoJ -- jonn3?
- cItdxRpebjPMVWfi -- jonn2?
- MWNtyNFKlB -- jonn2?
- RaDEIDTXgscQchqWiXL -- jonn1?
- ElAytOMYs -- jonn2?
- HoKeIOisfToRvrzxM -- jonn1?
- oyDcKSRcrJXXUKrFPuz -- jonn2?
- WwlvsYNEqaDfdBc -- jonn3?
- gwHWudvXIYPBqOw -- jonn1?
- aELXAQfIAxqYBswLx -- jonn2?
- RISetNLnuv -- jonn3?
- qEHvbsoH -- jonn3?
- OiYpXbtqbFc -- jonn1?
- sOuwuYWyBPimBaG -- jonn2?
- TCIdBXyG -- jonn3?