免费注册 查看新帖 |

Chinaunix

  平台 论坛 博客 文库
最近访问板块 发新帖
查看: 1280 | 回复: 0
打印 上一主题 下一主题

[FastDFS] 发现一处BUG,关于32位下的问题 [复制链接]

论坛徽章:
0
跳转到指定楼层
1 [收藏(0)] [报告]
发表于 2016-12-07 17:00 |只看该作者 |倒序浏览
  1. static void fast_allocator_malloc_trunk_notify_func(const int alloc_bytes, void *args)
  2. {
  3.         if (alloc_bytes > 0)
  4.         {
  5.                 __sync_add_and_fetch(&((struct fast_allocator_context *)args)->
  6.                         allocator_array.malloc_bytes, alloc_bytes);
  7.         }
  8.         else
  9.         {
  10.                 __sync_sub_and_fetch(&((struct fast_allocator_context *)args)->
  11.                         allocator_array.malloc_bytes, -1 * alloc_bytes);
  12.         }
  13. }
复制代码

fast_allocator.c下的代码,这个源码中还有几处sync操作,因为第一个参数malloc_bytes是64bit,在32位ARM下链接出错。x86没环境,未测试。希望关注一下这个问题。非常感谢~
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

北京盛拓优讯信息技术有限公司. 版权所有 京ICP备16024965号-6 北京市公安局海淀分局网监中心备案编号:11010802020122 niuxiaotong@pcpop.com 17352615567
未成年举报专区
中国互联网协会会员  联系我们:huangweiwei@itpub.net
感谢所有关心和支持过ChinaUnix的朋友们 转载本站内容请注明原作者名及出处

清除 Cookies - ChinaUnix - Archiver - WAP - TOP