MCPcopy Create free account
hub / github.com/F-Stack/f-stack / memguard_cmp

Function memguard_cmp

freebsd/vm/memguard.c:439–456  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

437}
438
439static int
440memguard_cmp(unsigned long size)
441{
442
443 if (size < memguard_minsize) {
444 memguard_minsize_reject++;
445 return (0);
446 }
447 if ((memguard_options & MG_GUARD_ALLLARGE) != 0 && size >= PAGE_SIZE)
448 return (1);
449 if (memguard_frequency > 0 &&
450 (random() % 100000) < memguard_frequency) {
451 memguard_frequency_hits++;
452 return (1);
453 }
454
455 return (0);
456}
457
458int
459memguard_cmp_mtp(struct malloc_type *mtp, unsigned long size)

Callers 2

memguard_cmp_mtpFunction · 0.85
memguard_cmp_zoneFunction · 0.85

Calls 1

randomFunction · 0.50

Tested by

no test coverage detected