chengwen's profile在路上PhotosBlogLists Tools Help

Blog


    July, 2005

    AMD大中华区签约融科C座

    真是不是冤家不碰头,都到中国还找到Intel的对门。看来是想来个近身肉搏?
    July, 2005

    堆和栈的区别

    算是基础问题了,转自水母programming精华区,解释的很详细
     
    一般认为在c中分为这几个存储区
    1栈 - 有编译器自动分配释放
    2堆 - 一般由程序员分配释放,若程序员不释放,程序结束时可能由OS回收
    3全局区(静态区),全局变量和静态变量的存储是放在一块的,初始化的全局变量和静
    态变量在一块区域,未初始化的全局变量和未初始化的静态变量在相邻的另一块区域。
     - 程序结束释放
    4另外还有一个专门放常量的地方。 - 程序结束释放
    在函数体中定义的变量通常是在栈上,用malloc, calloc, realloc等分配内存的函数分
    配得到的就是在堆上。在所有函数体外定义的是全局量,加了static修饰符后不管在哪
    里都存放在全局区(静态区),在所有函数体外定义的static变量表示在该文件中有效,
    不能extern到别的文件用,在函数体内定义的static表示只在该函数体内有效。另外,
    函数中的"adgfdf"这样的字符串存放在常量区。
    比如:
    int a = 0; 全局初始化区
    char *p1; 全局未初始化区
    main()
    {
    int b; 栈
    char s[] = "abc";栈
    char *p2; 栈
    char *p3 = "123456"; 123456\0在常量区,p3在栈上。
    static int c =0; 全局(静态)初始化区
    p1 = (char *)malloc(10);
    p2 = (char *)malloc(20);
    分配得来得10和20字节的区域就在堆区。
    strcpy(p1, "123456"); 123456\0放在常量区,编译器可能会将它与p3所指向的"12345
    6"优化成一块。
    }
    还有就是函数调用时会在栈上有一系列的保留现场及传递参数的操作。
    栈的空间大小有限定,vc的缺省是2M。栈不够用的情况一般是程序中分配了大量数组和
    递归函数层次太深。有一点必须知道,当一个函数调用完返回后它会释放该函数中所有
    的栈空间。栈是由编译器自动管理的,不用你操心。
    堆是动态分配内存的,并且你可以分配使用很大的内存。但是用不好会产生内存泄漏。
    并且频繁地malloc和free会产生内存碎片(有点类似磁盘碎片),因为c分配动态内存时
    是寻找匹配的内存的。而用栈则不会产生碎片。
    在栈上存取数据比通过指针在堆上存取数据快些。
    一般大家说的堆栈和栈是一样的,就是栈(stack),而说堆时才是堆heap.
    栈是先入后出的,一般是由高地址向低地址生长。
     
     
    July, 2005

    Microsoft sues over Google hire

         Google 从微软挖走李开复,这个世界真是变化快阿
     

    Microsoft sues over Google hire

    update Opening a new chapter in its rivalry with Google, Microsoft on Tuesday sued the search giant and a former Microsoft executive who has been tapped by Google to run its China operations.

    The suit was filed in a Washington state court against Google and Kai-Fu Lee, who until Monday was the corporate vice president of Microsoft's Interactive Services Division.

    Google said earlier Tuesday that Lee was joining the company and would head up a new research effort in China.

    "There was no effort by Dr. Lee or Google to try and work out any kind of agreement."
    --Tom Burt, deputy general counsel, Microsoft

    "Accepting such a position with a direct Microsoft competitor like Google violates the narrow non-competition promise Lee made when he was hired as an executive," Microsoft said in its lawsuit, which was seen by CNET News.com. "Google is fully aware of Lee's promises to Microsoft, but has chosen to ignore them, and has encouraged Lee to violate them."

    In the suit, Microsoft seeks monetary damages as well as an injunction upholding the noncompete clause and other provisions of Lee's contract, including terms barring him from sharing Microsoft trade secrets.

    Google has emerged as a top rival for Microsoft, and several notable employees have left the software giant for Google in recent months. The company is seen as an aggressive rival to Microsoft in areas such as desktop search and e-mail. In addition, its services work well with any operating system.

    Google issued a press release on Lee's hiring and announced plans to open a China research and development center this quarter.

    "Under the leadership of Dr. Lee, with his proven track record of innovation and his passion for technology and research, the Google China R&D center will enable us to develop more innovative products and technologies for millions of users in China and around the world," Alan Eustace, Google engineering vice president, said in a statement.

    Lee, an expert in speech recognition technology, founded Microsoft's China research lab in the late 1990s and worked at Silicon Graphics Inc. and Apple Computer before joining Microsoft.

    A Google representative was not immediately available to comment on Microsoft's legal actions.

    Google's public touting that it had hired Lee is in and of itself unique. The company rarely announces new hires, with CEO Eric Schmidt's hiring being a notable exception.

    Though workers leave tech companies for rivals all the time, it's not uncommon for a dispute to end up in court, particularly when an executive has a contract with a noncompete clause. Microsoft has turned to legal channels before to pursue former employees who it felt were unfairly competing against the company.

    Notably, the company sued when former executive Tod Nielsen and a number of ex-Microsoft employees went to work for Crossgain, a start-up that was focused on allowing business applications to run over the Web.

    Crossgain eventually disassociated itself from a number of Microsoft workers that were still bound to noncompete agreements. Among the other ex-Microsofties who were forced to step down, at least temporarily, were Nielsen and Adam Bosworth, a founder of Crossgain.

    Crossgain was swallowed up by BEA Systems in 2001, with both Nielsen and Bosworth joining the software maker. The two left BEA last year, and Bosworth joined Google

     
     
     
     
     
     
     

     

    A Microsoft lawyer said in an interview that Lee's move to join Google was a "particularly egregious" violation of the noncompete agreement that he had signed when he joined Microsoft.

    "He has access to sensitive information, to trade secrets about our search technology and business plans and our China business strategies," Deputy General Counsel Tom Burt told CNET News.com. "He has accepted a position in direct competition with Microsoft in those areas."

    Lee had been working most recently at Microsoft's Redmond, Wash., headquarters, focusing on new search technologies. According to the lawsuit, for a time Lee had been the person "responsible for overall development of the MSN Internet search application." He also served as a member of a company advisory board that focused on China-related strategies, a post that, according to the suit, gave him access to the company's business strategy and planned expansion targets.

    In the suit, Microsoft said that on July 5, Lee informed his department head, Eric Rudder, that he did not plan to return to Microsoft from a sabbatical and that he had talked with Google about heading up that company's China efforts.

    Burt said that Microsoft was formally notified of Lee's plans Monday and that the company served him with legal papers later that day.

    "There was no effort by Dr. Lee or Google to try and work out any kind of agreement," Burt said. "The combination of those factors meant that we really had no choice but to file this suit to protect our confidential information."

    CNET News.com's Stefanie Olsen contributed to this report.

    May, 2005

    一个酷站

    太酷了!admire奇技淫巧!

    http://misho.smartuml.com/