post-thumbnail

파이프 버퍼

부모 자식간 파이프를 두 개 열어놓고하나는 리퀘스트 바디를 자식에게 write하고하나는 execve의 결과를 부모가 read하도록 했음그런데 바디 사이즈가 클 때, partial write가 발생하는데 파이프 버퍼사이즈(65536byte) 만큼 두 번 쓰고 나면 kev

2023년 1월 5일
·
0개의 댓글
·

[소켓 프로그래밍] setsockopt & getsockopt & kqueue

setsockopt `socket`: socket으로 소켓 디스크립터 `level` : 프로토콜 레벨 (SOLSOCKET, IPPROTOIP, IPPROTOTCP, IPPROTOIPV6 등) `option_name` : 옵션 이름 `option_value` : 설정할

2022년 11월 19일
·
0개의 댓글
·
post-thumbnail

dup & dup2

dup이 복사 개념 dup2가 덮어쓰기 개념이라고 생각하면 될 것 같다.pipe를 할 때 dup2로 STDIN 또는 STDOUT을 pipe()로 할당한 fd에 연결하는 것은command들이 원래 표준입출력의 fd인 0 또는 1을 통해 읽거나 쓰게 되어 있기 때문에 du

2022년 11월 19일
·
0개의 댓글
·
post-thumbnail

인셉션

VM 세팅(UTM) https://velog.io/@zhy2on/Ubuntu-20.04-for-ARM-설치해보기 ubuntu 20.04 desktop 최소설치 & firefox 설치 환경으로 세팅했다. Common Ground 환경변수 docker에서는 컨테이너에서

2022년 10월 29일
·
0개의 댓글
·
post-thumbnail

[C++ STL] stack

https://cplusplus.com/reference/stack/stack/?kw=stackstacks are implemented as container adaptors, which are classes that use an encapsulated obj

2022년 10월 10일
·
0개의 댓글
·
post-thumbnail

[C++ STL] set

https://cplusplus.com/reference/set/set/Sets are containers that store unique elements following a specific order. 👉 set은 unique element를 가지고 특정

2022년 10월 7일
·
0개의 댓글
·
post-thumbnail

[C++ STL] rbtree_iterator

https://github.com/gcc-mirror/gcc/blob/master/libstdc%2B%2B-v3/include/bits/stl_tree.h https://cplusplus.com/reference/iterator/ rbtree_iterator는 `b

2022년 9월 22일
·
0개의 댓글
·
post-thumbnail

[C++ STL] pair, make_pair

https://cplusplus.com/reference/utility/pair/?kw=pairThis class couples together a pair of values, which may be of different types (T1 and T2). T

2022년 9월 16일
·
0개의 댓글
·
post-thumbnail

[C++ STL] map

https://cplusplus.com/reference/map/map/?kw=map Description Maps are associative containers that store elements formed by a combination of a key va

2022년 9월 16일
·
0개의 댓글
·
post-thumbnail

[C++ STL] iterator_traits

https://cplusplus.com/reference/iterator/iterator_traits/?kw=iterator_traits이터레이터 속성을 정의하는 특성 클래스이다.모든 이터레이터는 최소한 아래 멤버 타입을 포함해야 함.

2022년 9월 4일
·
0개의 댓글
·
post-thumbnail

[C++ STL] type_traits

is_integral https://cplusplus.com/reference/typetraits/isintegral/?kw=is_integral https://stackoverflow.com/questions/43571962/how-is-stdis-integral-implemented 이런 식으로 구현. template type이 integral인지 ...

2022년 9월 4일
·
0개의 댓글
·
post-thumbnail

[C++ STL] random-access-iterator (vector iterator)

https://cplusplus.com/reference/iterator/RandomAccessIterator/ vector의 iterator는 randomaccessiterator 이다. 아래 custom iterator에서 iteratortag를 randomacce

2022년 8월 31일
·
0개의 댓글
·
post-thumbnail

[C++ STL] vector

https://cplusplus.com/reference/vector/vector/?kw=vector Description Vectors are sequence containers representing arrays that can change in size. 👉 vector는 사이즈를 바꿀 수 있는 배열을 나타내는 sequence 컨테이너 Jus...

2022년 8월 27일
·
0개의 댓글
·
post-thumbnail

[C++ STL] reverse_iterator

https://cplusplus.com/reference/iterator/reverseiterator/?kw=reverseiterator Description This class reverses the direction in which a bidirectional or random-access iterator iterates through a rang...

2022년 8월 27일
·
0개의 댓글
·
post-thumbnail

미니알티

카메라로부터 쏜 ray가 물체에 부딪혀 돌아오게 되는 경로를 추적하여 색을 입히는 그래픽 기법이다.ray = origin + (t \* dir)ray는 ray가 시작되는 원점 origin에 방향벡터 direction에 시간 t를 곱한 값을 더하여 계산하게 된다.ray와

2022년 8월 15일
·
0개의 댓글
·
post-thumbnail

미니알티 사이트

https://www.scratchapixel.com/lessons/3d-basic-rendering/ray-tracing-generating-camera-rays/generating-camera-rays

2022년 8월 6일
·
0개의 댓글
·
post-thumbnail

씨쁠쁠08

ex00 STL https://blockdmask.tistory.com/67 container 객체를 저장하는 객체, 자료구조 라고도 한다. 클래스 템플릿으로 구현되어있다. 출처: https://blockdmask.tistory.com/67 [개발자 지망생:티스토리]

2022년 6월 21일
·
0개의 댓글
·
post-thumbnail

씨쁠쁠07

함수 템플릿 연습https://modoocode.com/219template <class T> 또는 template <typename T> 와 같이 사용 (typename으로 사용하기)템플릿은 반드시 인스턴스화 되어야지만 비로소 컴파일러가 실제 코드

2022년 6월 21일
·
0개의 댓글
·
post-thumbnail

씨쁠쁠06

리터럴 문자열 인자를 타입별로 변환하여 반환하는 클래스를 만든다non displayable characters 는 안 쓴다고 가정ex) ’c’, ’a’, ...ex) 0, -42, 42...ex) 0.0f, -4.2f, 4.2f...ex) 0.0, -4.2, 4.2..

2022년 6월 19일
·
0개의 댓글
·
post-thumbnail

씨쁠쁠05

예외가 생긴 경우 throw를 쓰고 전달하고 싶은 객체를 써준다.아무 객체나 던져도 상관 없지만 표준 라이브러리에 여러 예외가 미리 정의되어 있음. 이를 사용하면 좋음.throw 한 위치에서 즉시 함수가 종료되고 예외처리 부분으로 점프. (가장 가까운 catch문으로

2022년 6월 14일
·
0개의 댓글
·