zoukankan      html  css  js  c++  java
  • qf

    #pragma intrinsic (_InterlockedIncrement)
    #pragma intrinsic (_InterlockedDecrement)
    #pragma intrinsic (memcpy)

    The intrinsic pragma tells the compiler that a function has known behavior. The compiler may call the function and not replace the function call with inline instructions, if it will result in better performance. Link

    For Windows

    __declspec(align(8)) volatile long m_lRefCount;

    For Linux

    __attribute__((aligned(8))) volatile long m_lRefCount;

    This usage make the align for variable and require the value from variable, not from register.

    保证申请的代码是在这个类对象之后,+1相当于+sizeof(class),因为指针的+-是根据左操作数来决定的。

                    inline unsigned char *GetBuffer()
                    {
                      // the buffer follows immediately after this class
                      return (unsigned char *)(this + 1);
                    };

  • 相关阅读:
    Axure chrome 安装及已损坏的解决方法
    Ubuntu16.04上使用git
    ubuntu初探
    nginx入门笔记
    更改element-UI按钮默认样式
    js深拷贝与浅拷贝的区别及实现
    安装mysql-python的遇到的问题
    facebook atc弱网环境搭建和踩坑总结
    验证码识别 Tesseract的简单使用和总结
    selenium 基础(一)
  • 原文地址:https://www.cnblogs.com/rogerroddick/p/3063275.html
Copyright © 2011-2022 走看看