Diff for /freem/src/shmmgr.c between versions 1.1 and 1.3

version 1.1, 2025/01/19 02:04:04 version 1.3, 2025/03/09 15:20:18
Line 15 Line 15
  *    shared memory manager   *    shared memory manager
  *   *
  *     *  
  *   Author: Serena Willis <jpw@coherent-logic.com>   *   Author: Serena Willis <snw@coherent-logic.com>
  *    Copyright (C) 1998 MUG Deutschland   *    Copyright (C) 1998 MUG Deutschland
  *    Copyright (C) 2020 Coherent Logic Development LLC   *    Copyright (C) 2020 Coherent Logic Development LLC
  *   *
Line 100  short shm_init(const size_t seg_size) Line 100  short shm_init(const size_t seg_size)
     shm_config->seg_id = shmget (shm_config->key, shm_config->segsiz, 0660 | IPC_CREAT);      shm_config->seg_id = shmget (shm_config->key, shm_config->segsiz, 0660 | IPC_CREAT);
     if (shm_config->seg_id == -1) {      if (shm_config->seg_id == -1) {
         if (errno == 22) {          if (errno == 22) {
             fprintf (stderr, "shm_init:  cannot get shared memory segment of %d bytes\r\n\r\n", shm_config->segsiz);              fprintf (stderr, "shm_init:  cannot get shared memory segment of %ld bytes\r\n\r\n", (unsigned long) shm_config->segsiz);
             fprintf (stderr, "You may need to tune your kernel parameters, or manually set a smaller shared memory segment size in both the FreeM daemon and each interpreter process by using the `-S` command-line flag.\r\n\r\nPlease refer to the FreeM Platform Notes for your operating system for details.\r\n\r\n");               fprintf (stderr, "You may need to tune your kernel parameters, or manually set a smaller shared memory segment size in both the FreeM daemon and each interpreter process by using the `-S` command-line flag.\r\n\r\nPlease refer to the FreeM Platform Notes for your operating system for details.\r\n\r\n"); 
         }          }
         return SHMS_GET_ERR;          return SHMS_GET_ERR;
Line 473  void shm_dump(void) Line 473  void shm_dump(void)
 {  {
   
     printf ("SHARED MEMORY CONFIGURATION\r\n");      printf ("SHARED MEMORY CONFIGURATION\r\n");
     printf ("  pgsiz                   %d\r\n", shm_config->pgsiz);      printf ("  pgsiz                   %ld\r\n", (unsigned long) shm_config->pgsiz);
     printf ("  pgct                    %d\r\n", shm_config->pgct);      printf ("  pgct                    %d\r\n", shm_config->pgct);
     printf ("  key                     %d\r\n", shm_config->key);      printf ("  key                     %ld\r\n", shm_config->key);
     printf ("  segid                   %d\r\n", shm_config->seg_id);      printf ("  segid                   %d\r\n", shm_config->seg_id);
     printf ("  sizeof shm_page_t       %d\r\n", sizeof (shm_page_t));      printf ("  sizeof shm_page_t       %ld\r\n", (long) sizeof (shm_page_t));
     printf ("  segsiz                  %d\r\n", shm_config->segsiz);      printf ("  segsiz                  %ld\r\n", (long) shm_config->segsiz);
     printf ("  shm address             %p\r\n", shm_config->dta);      printf ("  shm address             %p\r\n", shm_config->dta);
     printf ("  alloc_map size          %d\r\n", sizeof (shm_page_t) * shm_config->pgct);      printf ("  alloc_map size          %ld\r\n", (unsigned long) sizeof (shm_page_t) * shm_config->pgct);
     printf ("  buf address             %p\r\n", shm_config->buf);      printf ("  buf address             %p\r\n", shm_config->buf);
 }  }
   

Removed from v.1.1  
changed lines
  Added in v.1.3


FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>