Posts

OS Books

 https://github.com/iceqp/books-1/blob/master/The%20Design%20and%20Implementation%20of%20the%20FreeBSD%20Operating%20System%20(2nd%20Edition).pdf

Array Boxing

  a[a[a[a[0]]]] c is encrypting b array and b array is encrypting a array a[b[c[i]]] a[a[a[a[i]]]] == i then it's cyclic in nature

Good Practices in C programming

  Use void* for pushing structures or datatype is unknown realloc and memcpy can be used together for editing or changing the size of existing data types specially for strings and designing string library. Always try to copy string to new array or dynamic array rather then assigning the base pointer of the array in C as string manipulation will become tough using pointer. use dynamic array, dynamic stack, string, dictionary, priority queues,  tuples as data structures by creating library always initialize a string with calloc so that '\0' char is assigned to each index in string array for a linked list to be used again use erase() to clean all linked list nodes always use strncpy/strncmp instead of strcpy/strcmp Always set '\0' at the last index of string/char array Don't expect copy-on-write in C and don't try to rewite a string in C rewriting an existing character array often leads to crashes , due to array out of bounds always to try to allocate & copy to...

Calling Conventions

  https://en.wikipedia.org/wiki/X86_calling_conventions cdecl stdcall

How to debug if you have difference in 2 repos that have 7-8 repo in between

 Just download all the repos and check git log or hg log   1st repo HD_R6201 & 2nd repo BBDR2014 the 1st repo has the bug then check the date in between where submissions are missing in 1st repo then goto 2nd repo check all the fixes that have been commited if not then check all intermediate or in between repos or branches Incase of emergency check in 1 repo above HD_R6201 that is HD_R6301 Check the exact scenario must match 

Important mercurial commnads

 hg diff -r <changeset-no1>:<changeset-no1+1> example :- hg diff -r 66237:66238 hg log --keyword "call" (will search all the commits with "call" in discription hg diff -c <commit-id> hg log -r <CS ID> --debug   (to know the commit details and branch name) example:- starting pager for command 'log' changeset: 14986:3b584f4ea27ebe6178c81d74767fe0f24290377b branch: cvp95 phase: public parent: 14985:762a72f7821ca441f5d0a3975eff344dd5a0e8a5 parent: -1:0000000000000000000000000000000000000000 manifest: 14918:d778007144b782255b9b1c0c56bc9a43f635e594 user: crzhang <crystal.zhang@nokia-sbell.com> date: Fri Dec 25 15:14:28 2020 +0800 files: SIP_PAL/pal/callmgnt/pal_callmgnt_wtconnect_state.cpp extra: branch=cvp95 description: BBDPROD-7552:Tight couple ONT IncomingTotalCallTime/TotalCallTime node does not work in call hold scenario