File: size.cc

package info (click to toggle)
bobcat 6.02.02-1
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 13,960 kB
  • sloc: cpp: 18,954; fortran: 5,617; makefile: 2,787; sh: 659; perl: 401; ansic: 26
file content (12 lines) | stat: -rw-r--r-- 292 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
#include "sharedsegment.ih"

size_t SharedSegment::size(int id)
{
    struct shmid_ds buf;

    if (shmctl(id, IPC_STAT, &buf) == -1)
        throw Exception{} << "Can't determine segment size of segment " <<
                            id << ": " << errnodescr;

    return buf.shm_segsz;
}