青青草原综合久久大伊人导航_色综合久久天天综合_日日噜噜夜夜狠狠久久丁香五月_热久久这里只有精品

Error

C++博客 首頁 新隨筆 聯(lián)系 聚合 管理
  217 Posts :: 61 Stories :: 32 Comments :: 0 Trackbacks
@網(wǎng)友
duilib的Dump對(duì)象里邊有一個(gè)臨界區(qū)對(duì)象,有幾個(gè)函數(shù)是被保護(hù)起來的。注釋掉就好了。
re: cocos2dx-quick 01 Enic 2015-04-06 23:29
--class方法有兩個(gè)參數(shù),第一個(gè)參數(shù)是類名,第二個(gè)參數(shù)可以通過兩種形式傳入 --一種是傳入一個(gè)函數(shù),一種是傳入一個(gè)Quick的類,或者Lua對(duì)象 --當(dāng)傳入函數(shù)時(shí),新創(chuàng)建的類會(huì)以傳入的函數(shù)作為構(gòu)造函數(shù),當(dāng)傳入的是一個(gè)對(duì)象時(shí),會(huì)以傳入的對(duì)象為父類派生下來。
后續(xù)的技能工具,寵物工具都沒有本質(zhì)變化,不再這樣分析了。
整個(gè)的思路都是以配置表填充游戲世界,細(xì)節(jié)上沒有其他亮點(diǎn),沒有特別出彩的數(shù)據(jù)結(jié)構(gòu)設(shè)計(jì),大部分都是大一統(tǒng)的配置表格。
后續(xù)出一個(gè)客戶端整個(gè)表格設(shè)計(jì)的概覽,然后分析其他的東東
用boost::shared_ptr 或者std::shared_ptr的時(shí)候沒有這個(gè)問題,我猜測是共享數(shù)據(jù)卡里邊保留了原始指針,,,@Chipset
linux各種坑
我們3.x的項(xiàng)目剛剛到中期,,,
@ccsdu2009
啥意思?
re: Muduo源碼閱讀 Enic 2014-05-05 10:47
樓主用的什么工具看的啊?
re: std::bind2nd簡單理解 Enic 2014-03-16 19:02
1.std::bind2nd std::bind1st 用于參數(shù)綁定
2.std::binary_function 等用于支持std::bind2nd std::bind1st
3.std::mem_fun1用于從普通函數(shù)構(gòu)造出派生于binary_function臨時(shí)對(duì)象支持bind系列
感覺應(yīng)該附上公司或者項(xiàng)目方向會(huì)合適一點(diǎn)
re: 擼UI庫:01 Enic 2013-12-02 20:04
@cpper
有計(jì)劃,山寨的三個(gè)對(duì)象中,兩個(gè)對(duì)象支持硬件加速,最開始看上chromium是應(yīng)為skia的硬件加速和跨平臺(tái)性,由于個(gè)人原因作罷。
抄襲的對(duì)象uileeihcy采用的是插件設(shè)計(jì),render是可替換的。
編譯chromium的時(shí)候也遇到了同樣的問題,各種定義都無效,最后還是找到原來的帖子,,,唉,,,

在C/C++ --> “預(yù)處理器”--> “預(yù)處理定義”中增加以下行即可:
_VARIADIC_MAX=10

這一招生效了,,,
老外是這么說的:

http://cbloomrants.blogspot.be/2011/07/07-14-11-compareexchangestrong-vs.html


07-14-11 - compare_exchange_strong vs compare_exchange_weak

The C++0x standard was revised a while ago to split compare_exchange (aka CAS) into two ops. A quick note on the difference :

bool compare_exchange_weak( T * ptr, T * old, T new );

bool compare_exchange_strong( T * ptr, T * old, T new );

(BTW in the standard "old" is actually a reference, which is a damn shitty thing to do because it makes it very non-transparent that "old" gets mutated by these functions, so I am showing it as a pointer).
both try to do :


atomically {
if ( *ptr == *old ) { *ptr = new; return true; }
else { *old = *ptr; return false; }
}

the difference is that compare_exchange_weak can also return false for spurious failure. (the original C++0x definition of CAS always allowed spurious failure; the new thing is the _strong version which doesn't).
If it returns due to spurious failure, then *old might be left untouched (and in fact, *ptr might be equal to *old but we failed anyway).

If spurious failure can only occur due to contention, then you can still gaurantee progress. In fact in the real world, I believe that LL-SC architectures cannot gaurantee progress, because you can get spurious failure if there is contention anywhere on the cache line, and you need that contention to be specifically on your atomic variable to gaurantee progress. (I guess if you are really worried about this, then you should ensure that atomic variables are padded so they get their own cache line, which is generally good practice for performance reasons anyway).

On "cache line lock" type architectures like x86, there is no such thing as spurious failure. compare_exchange just maps to "cmpxchg" instruction and you always get the swap that you want. (it can still fail of course, if the value was not equal to the old value, but it will reload old). (BTW it's likely that x86 will move away from this in the future, because it's very expensive for very high core counts)

compare_exchange_weak exists for LL-SC (load linked/store conditional) type architectures (Power, ARM, basically everything except x86), because on them compare_exchange_strong must be implemented as a loop, while compare_exchange_weak can be non-looping. For example :

On ARM, compare_exchange_weak is something like :

compare_exchange_weak:

ldrex // load with reservation
teq // test equality
strexeq // store if equal
and strexeq can fail for two reasons - either because they weren't equal, or because the reservation was lost (because someone else touched our cache line).
To implement compare_exchange_strong you need a loop :

compare_exchange_strong:

while ( ! compare_exchange_weak(ptr,old,new) ) { }

(note that you might be tempted to put a (*old = *ptr) inside the loop, but that's probably not a good idea, and not necessary, because compare_exchange_weak will eventually load *ptr into *old itself when it doesn't fail spuriously).
The funny bit is that when you use compare_exchange you often loop anyway. For example say I want to use compare_exchange_strong to increment a value, I have to do :


cur = *ptr;
while( ! compare_exchange_strong(ptr,&cur,cur+1) ) { }

(note it's a little subtle that this works - when compare_exchange_strong fails, it's because somebody else touched *ptr, so we then reload cur (this is why "old" is passed by address), so you then recompute cur+1 from the new value; so with the compare_exchange_strong, cur has a different value each time around this loop.)
But on an LL-SC architecture like ARM this becomes a loop on a loop, which is dumb when you could get the same result with a single loop :


cur = *ptr;
while( ! compare_exchange_weak(ptr,&cur,cur+1) ) { }

Note that with this loop now cur does *not* always take a new value each time around the loop (it does when it fails due to contention, but not when it fails just due to reservation-lost), but the end result is the same.
So that's why compare_exchange_weak exists, but you might ask why compare_exchange_strong exists. If we always use loops like this, then there's no need for it. But we don't always use loops like this, or we might want to loop at the much higher level. For example you might have something like :

bool SpinLock_TryLock(int * lock)
{
int zero = 0;
return compare_exchange_strong(lock,&zero,1);
}
which returns false if it couldn't get the lock (and then might do an OS wait) - you don't want to return false just because of a spurious failure. (that's not a great example, maybe I'll think of a better one later).
(BTW I think the C++0x stuff is a little bit broken, like most of C standardization, because they are trying to straddle this middle ground of exposing the efficient hardware-specific ways of doing things, but they don't actually expose enough to map directly to the hardware, and they also aren't high level enough to separate you from knowing about the hardware. For example none of their memory model actually maps directly to what x86 provides, therefore there are some very efficient x86-specific ways to do threading ops that cannot be expressed portable in C++0x. Similarly on LL-SC architectures, it would be preferrable to just have access to LL-SC directly.

I'd rather see things in the standard like "if LL-SC exist on this architecture, then they can be invoked via __ll() and __sc()" ; more generally I wish C had more conditionals built into the language, that would be so much better for real portability, as opposed to the current mess where they pretend that the language is portable but it actually isn't so you have to create your own mess of meta-language through #defines).
class CBase
{
public:
int i[255];

virtual ~CBase()
{
}
};

多謝大俠指點(diǎn),加上以后能正常delete@劍孤寒
可能我的表述有問題。
當(dāng)時(shí)是針對(duì)另一個(gè)場景所謂的只讀:我需要在遍歷過程中刪除部分節(jié)點(diǎn)。

感謝指出來,這個(gè)細(xì)節(jié)還需要繼續(xù)深挖@P
我搜索下代碼看看,確實(shí)有這個(gè)東西,看注釋應(yīng)該是可以選擇啟用,關(guān)閉,或者使用gtest自帶的版本@無
你問的比較抽象喲@xyl
一開始不要做框架,先考慮做成基礎(chǔ)庫。
基礎(chǔ)庫成熟了,框架就呼之欲出了。應(yīng)為你現(xiàn)在還不夠了解這里邊的道道,所以直接去做框架是很可能南轅北轍的。
可以先參考QT WTL MFC的設(shè)計(jì)思想,然后以實(shí)際項(xiàng)目為導(dǎo)向。
如果是做界面有一本老書推薦給你:《道法自然》

還有如果你定位是windows平臺(tái),可以考慮用ATL包裝窗口,ATL的窗口循環(huán)hack已經(jīng)做好了,而且做穩(wěn)定了。
"因此2進(jìn)制文件的可移植性好。"

書上說的是字符可移植性好,你可能沒有考慮到異構(gòu)系統(tǒng)
首先膜拜一下大神,,,

svn剛剛更新了代碼,發(fā)現(xiàn)一點(diǎn)點(diǎn)小問題
file:examples\igantt\gantt_main.cpp
line:PathProvider(base::DIR_EXE, &res_dll);
編譯器說不認(rèn)識(shí)這貨,,,


后來把這兩貨移動(dòng)到 path_service.h, chrome編譯通過
namespace base
{

bool PathProvider(int key, FilePath* result);
bool PathProviderWin(int key, FilePath* result);

}


再后來igantt在鏈接的時(shí)候連接器說不認(rèn)識(shí)這貨
_modp_b64_encode
估計(jì)要重新編譯base lib,
正在編譯ing
無效
搜索代碼,好像這個(gè)函數(shù)確實(shí)沒有。終于被我找到一個(gè)bug了,,,



××××××××××××××××××××××××××××××××××××××××
博客追了很久了,第一次冒泡。
說來慚愧,小弟道行不夠,直接看chrome差點(diǎn)傻眼了,只能跟著大神的腳步了,,,希望跟得上,,,
再次謝過博主大神的無私奉獻(xiàn),,,
樓上非常正確,,,
@華夏之火
樓主已經(jīng)很客氣了,,,
并不非要全部用a b c 1 2 3代碼揉成一團(tuán)才是牛逼算法,,,
re: C++雜談 Enic 2011-07-11 10:14
90%贊同,感同身受,,,
愚以為,組裝工廠自動(dòng)化流水線更合適,,,
re: IOCP完成端口源代碼 Enic 2011-07-04 15:15
樓主,你確定你用的是Window IOCP技術(shù)?
雖然不知道樓主在說什么,但是感覺樓主很牛逼,,,

膜拜大神啊,,,
膜拜大神,求帶,,,

我折騰好久了,,,七竅都通了六竅了,,,
@ray ban glasses

這個(gè)是真洋鬼子?
@千暮(zblc)
我囧,,,一樓也是哥,,,

大神太牛逼了,偶以前就見過這個(gè)lib,才發(fā)現(xiàn)原來是這里的神仙搞出來的,,,
這世上原本沒有神仙,后來有人做了人想做但是做不到的事情,神就誕生了,,,


膜拜大神啊~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
(后面的注意保持隊(duì)形~~)
囧,,,哥昨天晚上不小心膜拜了一下,,,

你們這群神棍就全部跳出來了,,,

膜拜大神啊,,,
膜拜大神啊,,,
青青草原综合久久大伊人导航_色综合久久天天综合_日日噜噜夜夜狠狠久久丁香五月_热久久这里只有精品
  • <ins id="pjuwb"></ins>
    <blockquote id="pjuwb"><pre id="pjuwb"></pre></blockquote>
    <noscript id="pjuwb"></noscript>
          <sup id="pjuwb"><pre id="pjuwb"></pre></sup>
            <dd id="pjuwb"></dd>
            <abbr id="pjuwb"></abbr>
            日韩天堂在线观看| 先锋影音国产精品| 一本色道久久综合亚洲精品高清| 欧美电影美腿模特1979在线看| 亚洲成人资源网| 亚洲免费精彩视频| 国产精品国产三级国产| 午夜精品久久久久久久久久久久久 | 91久久国产综合久久蜜月精品| 米奇777在线欧美播放| 亚洲日本一区二区| 亚洲欧美在线高清| 亚洲第一精品电影| 欧美三级在线播放| 欧美夜福利tv在线| 亚洲人成网站在线播| 亚洲专区在线| 在线成人激情| 国产精品xvideos88| 欧美freesex交免费视频| 欧美激情视频网站| 亚洲综合色丁香婷婷六月图片| 国产一区二区高清视频| 欧美激情一二三区| 亚洲一区日韩在线| 欧美国产日韩一区二区| 亚洲综合精品一区二区| 在线不卡a资源高清| 欧美午夜不卡在线观看免费 | 亚洲天堂男人| 黑人一区二区| 国产精品v欧美精品v日本精品动漫| 欧美有码视频| 一区二区三区鲁丝不卡| 免费在线日韩av| 午夜在线精品偷拍| 亚洲精品免费网站| 精久久久久久久久久久| 国产精品国产三级国产aⅴ无密码| 久久久久在线| 午夜伦理片一区| 日韩午夜在线播放| 欧美激情麻豆| 久久综合激情| 欧美中文字幕在线| 一区二区欧美日韩视频| 最近中文字幕日韩精品 | 亚洲午夜一区二区| 亚洲国产婷婷香蕉久久久久久99| 国产精品一区免费观看| 欧美日韩人人澡狠狠躁视频| 久久裸体视频| 午夜欧美精品久久久久久久| 99re66热这里只有精品4| 欧美丰满高潮xxxx喷水动漫| 久久精品一区二区三区不卡| 亚洲自拍偷拍视频| 一区二区精品国产| 一区二区欧美精品| 亚洲精品视频免费在线观看| 在线成人激情黄色| 在线成人h网| 精品88久久久久88久久久| 国产亚洲精品高潮| 国产欧美一区二区精品性| 国产精品电影观看| 国产精品久久久久久久久免费樱桃 | 欧美精品在线免费播放| 欧美成人免费va影院高清| 免费在线观看日韩欧美| 久久综合国产精品台湾中文娱乐网| 欧美亚洲在线视频| 欧美一二三区精品| 久久成人国产| 久久精品论坛| 老司机午夜精品视频| 快播亚洲色图| 欧美高清视频一区| 欧美大片va欧美在线播放| 欧美黑人多人双交| 欧美日韩mp4| 欧美日韩视频专区在线播放| 欧美日韩中文精品| 国产精品久久一区主播| 国产日韩欧美中文| 在线播放中文一区| 亚洲区一区二| 一区二区三区四区五区精品视频 | 久久黄色级2电影| 久久久国产精品一区二区中文| 久久美女性网| 欧美国产亚洲视频| 亚洲毛片av在线| 在线亚洲电影| 欧美在线你懂的| 美女999久久久精品视频| 欧美国产一区二区| 国产精品久久久久毛片软件| 国产欧美一区在线| 亚洲高清自拍| 一本色道久久加勒比88综合| 欧美一区在线直播| 免费在线观看成人av| 91久久线看在观草草青青| 一区二区三区高清视频在线观看 | 国产精品人人做人人爽 | 亚洲国产欧美久久| 亚洲深夜影院| 久久网站热最新地址| 欧美日韩国产不卡在线看| 国产欧美日韩麻豆91| 91久久精品日日躁夜夜躁欧美| 亚洲淫性视频| 欧美成人一区二区在线| 亚洲婷婷免费| 老司机一区二区| 国产精品自拍三区| 亚洲精选成人| 久久久久久亚洲精品不卡4k岛国| 亚洲福利专区| 欧美一区免费视频| 欧美日韩一二三四五区| 黄色一区二区在线观看| 亚洲一区二区精品视频| 免费日韩成人| 午夜精品www| 欧美高清视频一区二区| 黄色一区二区在线| 亚洲中无吗在线| 亚洲第一区在线| 欧美在线视频二区| 国产精品户外野外| 日韩系列在线| 欧美韩日高清| 亚洲精品一区二区网址| 亚洲永久精品大片| 亚洲国产一区二区三区在线播 | 欧美国产第二页| 国语精品一区| 久久成人精品视频| av成人免费在线| 欧美激情一区在线| 在线观看日韩| 久久久久久久精| 亚洲影院色无极综合| 欧美三级午夜理伦三级中视频| 亚洲欧洲日韩女同| 欧美高清不卡| 久久久无码精品亚洲日韩按摩| 国产欧美一区二区三区久久 | 久久国产色av| 亚洲视频电影图片偷拍一区| 欧美日韩国产bt| 亚洲精品欧美日韩| 欧美国产一区二区| 老司机免费视频久久| 欲香欲色天天天综合和网| 久久视频在线免费观看| 性欧美办公室18xxxxhd| 国产一区二区三区高清| 久久精品国产清高在天天线 | 在线成人激情| 欧美成人免费观看| 六月天综合网| 亚洲黄色三级| 亚洲国产成人在线播放| 欧美精品国产精品| 国产精品99久久99久久久二8| 亚洲国产精品va在看黑人| 欧美大片专区| 99视频在线观看一区三区| 亚洲精选一区| 国产精品多人| 欧美专区在线| 久久精品国产96久久久香蕉| 在线观看成人小视频| 欧美黑人国产人伦爽爽爽| 欧美激情一二区| 亚洲自拍啪啪| 欧美在线日韩在线| 亚洲国产精品传媒在线观看| 亚洲激情影视| 国产精品99免费看| 久久精品视频免费观看| 久久免费视频观看| 一本大道久久a久久精品综合| 99精品视频一区| 国产亚洲精品资源在线26u| 玖玖玖国产精品| 免费在线看一区| 亚洲一区二区三区激情| 欧美在线你懂的| 日韩视频一区二区| 亚洲午夜一区二区| 精品福利免费观看| 日韩天堂在线视频| 狠狠久久亚洲欧美| 亚洲精品美女免费| 国产婷婷色一区二区三区在线| 欧美成人精品在线播放|