Better HN
topnewbestaskshowjobs
Log inSign up

dzeban

49 karma · joined Nov 25, 2014 (12y ago) · 7 submissions

Submissions

1.

Show HN: Tzconv – Time converter with timezone fuzzy search(github.com ↗)

1 points · by dzeban · 8y ago · discuss

2.

How to point GDB to your sources(alex.dzyoba.com ↗)

15 points · by dzeban · 9y ago · discuss

3.

Multiboot kernel(alex.dzyoba.com ↗)

2 points · by dzeban · 11y ago · discuss

comment 11y ago · link · parent

I guess, you're right - for naive implementation it should fall with error, not a segfault. Maybe I just add a check for realloc result.

As for qsort implementation - I was confused by glibc sources ;-) What I've found was a slow but in-place implementation, and what you've shown me is an actual implementation that invokes an in-place variant when allocation was failed:

  tmp = malloc (size);
  __set_errno (save);
  if (tmp == NULL)
    {
      /* Couldn't get space, so use the slower algorithm
         that doesn't need a temporary array.  */
      _quicksort (b, n, s, cmp, arg);
      return;
    }
Thanks for feedback!

5.

When memory is not enough(avd.reduct.ru ↗)

28 points · by dzeban · 11y ago · 6 comments

comment 12y ago · link · parent

1M is too small for what? For sorting? Dunno, will see next time when try to implement external merge sort :-). Too small for the whole program? Of course, it won't load runtime - I've shown it in container and qemu parts.

7.

Restricting program memory(avd.reduct.ru ↗)

27 points · by dzeban · 12y ago · 6 comments