Browse Source

my_pagepages: perror -> my_error

pull/1502/head
Daniel Black 6 years ago
committed by Sergey Vojtovich
parent
commit
a0d5894015
  1. 3
      include/mysys_err.h
  2. 4
      mysys/errors.c
  3. 6
      mysys/my_largepage.c

3
include/mysys_err.h

@ -71,7 +71,8 @@ extern const char *globerrs[]; /* my_error_messages is here */
#define EE_CANT_COPY_OWNERSHIP 35
#define EE_BADMEMORYRELEASE 36
#define EE_PERM_LOCK_MEMORY 37
#define EE_ERROR_LAST 37 /* Copy last error nr */
#define EE_MEMCNTL 38
#define EE_ERROR_LAST 38 /* Copy last error nr */
/* Add error numbers before EE_ERROR_LAST and change it accordingly. */

4
mysys/errors.c

@ -57,7 +57,8 @@ const char *globerrs[GLOBERRS]=
"Can't change mode for file '%s' to 0x%lx (Errcode: %M)",
"Warning: Can't copy ownership for file '%s' (Errcode: %M)",
"Failed to release memory pointer %p, %zu bytes (Errcode: %M)",
"Lock Pages in memory access rights required"
"Lock Pages in memory access rights required",
"Memcntl %s cmd %s error"
};
void init_glob_errs(void)
@ -105,6 +106,7 @@ void init_glob_errs()
EE(EE_CANT_COPY_OWNERSHIP)= "Warning: Can't copy ownership for file '%s' (Errcode: %M)";
EE(EE_BADMEMORYRELEASE)= "Failed to release memory pointer %p, %zu bytes (Errcode: %M)";
EE(EE_PERM_LOCK_MEMORY)= "Lock Pages in memory access rights required";
EE(EE_MEMCNTL) = "Memcntl %s cmd %s error";
}
#endif

6
mysys/my_largepage.c

@ -234,12 +234,14 @@ int my_init_large_pages(my_bool super_large_pages)
mpss.mha_flags= 0;
if (memcntl(NULL, 0, MC_HAT_ADVISE, (caddr_t) &mpss, 0, 0))
{
perror("memcntl MC_HAT_ADVISE cmd MHA_MAPSIZE_BSSBRK error (continuing)");
my_error(EE_MEMCNTL, MYF(ME_WARNING | ME_ERROR_LOG_ONLY), "MC_HAT_ADVISE",
"MHA_MAPSIZE_BSSBRK");
}
mpss.mha_cmd= MHA_MAPSIZE_STACK;
if (memcntl(NULL, 0, MC_HAT_ADVISE, (caddr_t) &mpss, 0, 0))
{
perror("memcntl MC_HAT_ADVISE cmd MHA_MAPSIZE_STACK error (continuing)");
my_error(EE_MEMCNTL, MYF(ME_WARNING | ME_ERROR_LOG_ONLY), "MC_HAT_ADVISE",
"MHA_MAPSIZE_STACK");
}
}
#endif /* HAVE_SOLARIS_LARGE_PAGES */

Loading…
Cancel
Save