⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 memory

📁 source of perl for linux application,
💻
字号:
####################################################################################  $Revision: 3 $##  $Author: mhx $##  $Date: 2007/01/02 12:32:31 +0100 $######################################################################################  Version 3.x, Copyright (C) 2004-2007, Marcus Holland-Moritz.##  Version 2.x, Copyright (C) 2001, Paul Marquess.##  Version 1.x, Copyright (C) 1999, Kenneth Albanowski.####  This program is free software; you can redistribute it and/or##  modify it under the same terms as Perl itself.##################################################################################=provides__UNDEFINED__=implementation#ifdef HAS_MEMCMP__UNDEFINED__  memNE(s1,s2,l)  (memcmp(s1,s2,l))__UNDEFINED__  memEQ(s1,s2,l)  (!memcmp(s1,s2,l))#else__UNDEFINED__  memNE(s1,s2,l)  (bcmp(s1,s2,l))__UNDEFINED__  memEQ(s1,s2,l)  (!bcmp(s1,s2,l))#endif__UNDEFINED__  MoveD(s,d,n,t)  memmove((char*)(d),(char*)(s), (n) * sizeof(t))__UNDEFINED__  CopyD(s,d,n,t)  memcpy((char*)(d),(char*)(s), (n) * sizeof(t))#ifdef HAS_MEMSET__UNDEFINED__  ZeroD(d,n,t)    memzero((char*)(d), (n) * sizeof(t))#else__UNDEFINED__  ZeroD(d,n,t)    ((void)memzero((char*)(d), (n) * sizeof(t)), d)#endif__UNDEFINED__  PoisonWith(d,n,t,b)  (void)memset((char*)(d), (U8)(b), (n) * sizeof(t))__UNDEFINED__  PoisonNew(d,n,t)     PoisonWith(d,n,t,0xAB)__UNDEFINED__  PoisonFree(d,n,t)    PoisonWith(d,n,t,0xEF)__UNDEFINED__  Poison(d,n,t)        PoisonFree(d,n,t)__UNDEFINED__  Newx(v,n,t)     New(0,v,n,t)__UNDEFINED__  Newxc(v,n,t,c)  Newc(0,v,n,t,c)__UNDEFINED__  Newxz(v,n,t)    Newz(0,v,n,t)=xsubsintcheckmem()  PREINIT:    char *p;  CODE:    RETVAL = 0;    Newx(p, 6, char);    CopyD("Hello", p, 6, char);    if (memEQ(p, "Hello", 6))      RETVAL++;    ZeroD(p, 6, char);    if (memEQ(p, "\0\0\0\0\0\0", 6))      RETVAL++;    Poison(p, 6, char);    if (memNE(p, "\0\0\0\0\0\0", 6))      RETVAL++;    Safefree(p);    Newxz(p, 6, char);    if (memEQ(p, "\0\0\0\0\0\0", 6))      RETVAL++;    Safefree(p);    Newxc(p, 3, short, char);    Safefree(p);  OUTPUT:    RETVAL=tests plan => 1ok(Devel::PPPort::checkmem(), 4);

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -