pike.git / src / pike_memory.h

version» Context lines:

pike.git/src/pike_memory.h:124:   struct mem_searcher   {    enum methods method;    char *needle;    size_t needlelen;    size_t hsize, max;    struct link links[MEMSEARCH_LINKS];    struct link *set[MEMSEARCH_LINKS];   };    + /* +  * The purpose of this function is to avoid dead store elimination in cases when +  * sensitive data has to be cleared from memory. +  */ + static INLINE void * guaranteed_memset(void * p, int c, size_t n) { +  volatile char * _p = p; +  while (n--) *_p++ = c; +  return p; + }      #include "pike_search.h"      #include "block_alloc_h.h"   extern int page_size;      /* Note to self: Prototypes must be updated manually /Hubbe */   PMOD_EXPORT ptrdiff_t pcharp_memcmp(PCHARP a, PCHARP b, int sz) ATTRIBUTE((pure));   PMOD_EXPORT long pcharp_strlen(PCHARP a) ATTRIBUTE((pure));