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

Error

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

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

這一招生效了,,,
re: boost::atomic 實現 spinlock Enic 2013-03-31 23:52
老外是這么說的:

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()
{
}
};

多謝大俠指點,加上以后能正常delete@劍孤寒
可能我的表述有問題。
當時是針對另一個場景所謂的只讀:我需要在遍歷過程中刪除部分節點。

感謝指出來,這個細節還需要繼續深挖@P
我搜索下代碼看看,確實有這個東西,看注釋應該是可以選擇啟用,關閉,或者使用gtest自帶的版本@無
re: (轉)C宏技巧匯總 Enic 2012-12-11 10:47
你問的比較抽象喲@xyl
一開始不要做框架,先考慮做成基礎庫。
基礎庫成熟了,框架就呼之欲出了。應為你現在還不夠了解這里邊的道道,所以直接去做框架是很可能南轅北轍的。
可以先參考QT WTL MFC的設計思想,然后以實際項目為導向。
如果是做界面有一本老書推薦給你:《道法自然》

還有如果你定位是windows平臺,可以考慮用ATL包裝窗口,ATL的窗口循環hack已經做好了,而且做穩定了。
"因此2進制文件的可移植性好。"

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

svn剛剛更新了代碼,發現一點點小問題
file:examples\igantt\gantt_main.cpp
line:PathProvider(base::DIR_EXE, &res_dll);
編譯器說不認識這貨,,,


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

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

}


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



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

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

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

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

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


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

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

膜拜大神啊,,,
膜拜大神啊,,,
青青草原综合久久大伊人导航_色综合久久天天综合_日日噜噜夜夜狠狠久久丁香五月_热久久这里只有精品
  • <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>
            欧美日韩在线一区二区| 亚洲欧美在线磁力| 欧美精品一二三| 久久九九电影| 狂野欧美一区| 欧美日韩国产区| 欧美日韩国产不卡在线看| 欧美日韩在线大尺度| 欧美日韩在线三级| 国产伦精品一区| 国内精品国语自产拍在线观看| 国产精品亚洲不卡a| 国产在线不卡精品| 亚洲人体影院| 美女爽到呻吟久久久久| 欧美精品一区二区三区四区| 欧美视频二区36p| 国产亚洲女人久久久久毛片| 尹人成人综合网| 亚洲视频导航| 麻豆精品视频在线| 一区二区三区四区五区在线| 久久精品91| 欧美视频一区二区在线观看| 一区二区三区在线不卡| 一本色道婷婷久久欧美| 久久久久国产精品一区二区| 亚洲国产精品ⅴa在线观看| 91久久精品国产91久久| 午夜精品免费在线| 欧美日韩123| 精品成人久久| 欧美一级片久久久久久久| 欧美黄色片免费观看| 欧美亚洲视频一区二区| 欧美日韩免费一区| 亚洲精品免费在线观看| 久久永久免费| 亚洲欧美日韩一区二区在线| 欧美精品一区二区三区一线天视频| 国产一区二区三区观看| 亚洲欧美在线视频观看| 一二美女精品欧洲| 欧美日本免费| 日韩视频在线观看| 亚洲电影免费观看高清完整版 | 久久只有精品| 亚洲一区在线观看视频| 欧美人妖另类| 亚洲精选久久| 欧美成人综合网站| 久久人人97超碰精品888| 国产精品久久久久久久午夜| 一本色道久久88亚洲综合88| 亚洲黄色成人久久久| 欧美 日韩 国产精品免费观看| 国内成人精品视频| 久久久激情视频| 欧美制服丝袜第一页| 国产揄拍国内精品对白| 久久影院午夜论| 久久亚洲春色中文字幕| 黄色成人在线网站| 久久天堂精品| 久热精品视频在线观看| 亚洲国产精品ⅴa在线观看| 免费日韩成人| 另类综合日韩欧美亚洲| 亚洲大胆女人| 亚洲国产精品久久久久婷婷老年| 久久久亚洲高清| 亚洲日本成人| 亚洲精品乱码久久久久久蜜桃91| 久久综合99re88久久爱| 久久五月激情| 亚洲精品自在久久| 亚洲精品一线二线三线无人区| 欧美日韩成人综合| 亚洲欧美日韩网| 欧美在线free| 亚洲国产欧美一区二区三区同亚洲 | 性色av一区二区三区| 国产啪精品视频| 久久嫩草精品久久久久| 免费观看在线综合色| 99国产精品| 午夜欧美精品| 亚洲国产另类精品专区| 一本久道久久综合中文字幕| 国产精品亚洲美女av网站| 久久精品一区二区三区不卡| 久久一区精品| 亚洲一区在线观看免费观看电影高清| 亚洲香蕉网站| 亚洲欧洲一区二区三区| 亚洲一区二区三区欧美| 亚洲国产精品t66y| 亚洲一区视频| 亚洲美女av网站| 久久se精品一区精品二区| 最新日韩在线视频| 西西裸体人体做爰大胆久久久| 亚洲国产一区二区视频| 亚洲综合三区| 亚洲视频一区二区| 久久午夜精品| 久久福利电影| 欧美日韩国产欧美日美国产精品| 久久久精品久久久久| 欧美精品久久久久久久久老牛影院| 欧美在线观看天堂一区二区三区| 欧美激情亚洲另类| 免费国产一区二区| 国产日韩欧美在线一区| 9人人澡人人爽人人精品| 91久久久久久久久久久久久| 亚洲欧美日韩国产精品| 亚洲视频国产视频| 欧美激情在线观看| 欧美xart系列高清| 黄色另类av| 午夜视频在线观看一区| 亚洲午夜国产一区99re久久| 欧美阿v一级看视频| 免费国产一区二区| 韩国一区电影| 欧美中文在线观看| 久久久www| 国产字幕视频一区二区| 午夜精品久久久久久99热软件| 亚洲欧美精品在线观看| 欧美性猛片xxxx免费看久爱 | 亚洲色图在线视频| 一级成人国产| 欧美美女福利视频| 亚洲精品免费观看| 99综合精品| 欧美日韩在线影院| avtt综合网| 亚洲欧美日韩精品久久奇米色影视| 欧美日韩一区二区三区视频 | 国产综合色在线| 久久本道综合色狠狠五月| 久久国产66| 精品成人国产| 欧美不卡激情三级在线观看| 亚洲高清资源| 亚洲毛片在线| 欧美视频三区在线播放| 亚洲无亚洲人成网站77777| 午夜精品久久久久久99热软件| 国产精品a久久久久| 亚洲欧美日韩综合aⅴ视频| 久久久久久一区二区三区| 激情欧美一区二区| 欧美国产极速在线| 亚洲图片欧美日产| 欧美在线视频观看免费网站| 国产亚洲精品一区二区| 久久夜色精品国产噜噜av| 亚洲激情欧美激情| 午夜欧美理论片| 黄色影院成人| 欧美日韩激情网| 香港成人在线视频| 亚洲国产免费| 久久国产精品久久w女人spa| 亚洲高清色综合| 国产精品黄色| 老司机午夜精品视频在线观看| 亚洲免费观看在线视频| 久久久久久久一区二区三区| 亚洲精品久久久蜜桃| 国产精品久久久久久久久婷婷| 久久激情视频免费观看| 亚洲伦理精品| 另类尿喷潮videofree | 欧美午夜精品理论片a级大开眼界 欧美午夜精品理论片a级按摩 | 性欧美大战久久久久久久久| 欧美**人妖| 性色一区二区| 一本色道88久久加勒比精品| 国产欧美在线视频| 欧美日韩免费观看一区三区 | 国产精品你懂的在线| 久久在线免费观看视频| 亚洲视频自拍偷拍| 亚洲黄网站在线观看| 久久精品99| 亚洲男人影院| 99亚洲一区二区| 亚洲国产精品久久久久秋霞蜜臀 | 亚洲欧美日韩一区二区| 亚洲精品国产视频| 免费视频久久| 久久精品视频播放| 亚洲综合色激情五月| 亚洲美女免费精品视频在线观看| 黄色成人av在线| 国产一区二区精品丝袜|